Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An interesting application of KLT in image processing is rotating a binary ( i . e . black - and - white ) image along

An interesting application of KLT in image processing is rotating a binary (i.e. black-and-white) image
along a horizontal (or vertical) direction. For example, if you want to identify screwdrivers and
wrenches that may travel on a manufacturing belt using a robot hand with a camera, you can make
shape-wise template matching. But, to make template matching, the shape directions must be
aligned; you cannot correlate the shape of a 45 degrees rotated wrench with another one rotated by
-10 degrees. We can use KLT to rotate all shapes to horizontal direction, and then apply a successful
template matching. The rotation requires identification of the direction of the tool (may it be a
screwdriver or a wrench). We do it as follows:
Assume that the tool is with black pixel over white background. We make a list of
coordinates (xi,yi) of the black pixels.
We find the average coordinate (corresponding to the center of the tool) and subtract this
from all coordinates (making them zero mean).
We construct a 22 correlation matrix by finding R=[E{xi2}E{xiyi}E{yixi}E{yi2}]
The eigenvectors of this matrix show the "major" and the "minor" axis of the tool, which
correspond to the "direction" of the tool. So!.. All we need to do is to rotate it to make it
horizontal. Therefore, we apply the KLT not to the pixel values, but to the pixel coordinates!
Question: (programming) Draw a black-white wrench image (or find one from the internet)
I:1...
Write a small code to give you an array of the coordinates corresponding to the black pixels.
Average them and subtract this mean to normalize coordinates to the center of the wrench.
Then, find the 22 autocorrelation of the coordinates and determine the eigenvectors. The
eigenvector with the larger eigenvalue must correspond to the vector in the direction of the
wrench, and the other eigenvector must be perpendicular, meaning the width of the
wrench. Using the angles of these vector, rotate-back the wrench and make it horizontal.
Show outputs of each step in your Matlab code.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions

Question

Presentations Approaches to Conveying Information

Answered: 1 week ago