HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Saving time finding a result by guessing first?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
resultfindingtimefirstguessingsaving

Problem

I am currently taking a graduate course about Image Processing in electrical engineering and while this question doesn't particularly relate to the class itself but rather some concepts in the algorithms we utilize.

One of the algorithms that we utilized was called, "Image Correlation" in order to find a "match" from using a segment of the picture and almost convolving it into the main picture. Below is an example of how this algorithm is implemented to find the correlation in the picture.

From Digital Image Processing by Rafael C. Gonzalez and Richard E. Woods...

My question is, instead of starting from the top left, why can't we estimate where the result is first before implementing the algorithm? Wouldn't it save time to know where you would like to start the process?

Solution

Yes, it absolutely would save time. You are quite right, and you are onto a good idea -- that idea is frequently used to speed up image matching.

The core challenge is: how do we come up with an estimate where the result might be, more efficiently than using the correlation algorithm? It's not obvious how to do that, short of doing a correlation (which wouldn't actually save any time).

Fortunately, there are ways to do that. A standard approach is to use an image pyramid. You downscale the image to a lower resolution, then look for a downscaled version of the T in that smaller image (again using correlation). Because the image is smaller, the correlation calculation goes faster. Then that gives you a pretty good estimate where the T is, and instead of searching the entire full-resolution image, you only need to check a small portion of the full-resolution image. If you find multiple matches in the downscaled image, you can check all of them on the full-resolution image.

Context

StackExchange Computer Science Q#90184, answer score: 2

Revisions (0)

No revisions yet.