0

This is a simple concept on removing edges for sift algorithm but it is difficult to understand...if anybody could explain it with the help of images i would be grateful..

"The idea is to calculate two gradients at the keypoint. Both perpendicular to each other. Based on the image around the keypoint, three possibilities exist. The image around the keypoint can be:

A flat region
If this is the case, both gradients will be small.

An edge
Here, one gradient will be big (perpendicular to the edge) and the other will be small (along the edge)

A “corner”
Here, both gradients will be big.

Corners are great keypoints. So we want just corners. If both gradients are big enough, we let it pass as a key point. Otherwise, it is rejected."

aushima
  • 87
  • 1
  • 1
  • 9
  • Stackoverflow is good for specific questions about real code. This is vague and seems to be about calculus. – Eric Lippert Apr 07 '13 at 05:52
  • sorry for that but i thought someone who would be knowing about it could have helped me... – aushima Apr 07 '13 at 06:05
  • People can help you if you make the question *about code*. Show us the code you've written and ask for help about that. Or ask a more specific question. The more specific questions I have after reading this description are questions like: what does it mean to 'calculate two gradients perpendicular to each other'? How is that even a *gradient*? It sounds like a *partial derivative*, not a *gradient*. And why just two "gradients"? Suppose the edge is parallel to neither perpendicular "gradient" -- won't it then be counted as a corner? And so on. – Eric Lippert Apr 07 '13 at 14:49
  • What is your specific question? –  May 06 '13 at 04:32

1 Answers1

0

As the tag SIFT indicates the question/excerpt is related to local image features that are used in computer vision. How the algorithm that you are studying removes edges is not covered by the excerpt. To display the edges of an image you could use Canny Edge Detector on Wikipedia. Your excerpt basically explains how corners are detected in grayscale images, which is useful for feature detection.

The motivation is the following:

  • Natural images contain a lot of complex visual information. Objects that you wish to detect across different images can be rotated, deformed, occluded, viewed at different lighting conditions, etc. etc. This makes the problem hard.
  • An idea to cope with that is to identify smaller parts of the object and re-detect them across images. If a sufficiently large subset of these parts occur in another image, and if they are geometrically consistent, you could argue that the object is partially visible in the other image.
  • Now if you loop over the image with a rectangle sliding window you have to decide if that patch contains enough visual information so that it can be re-detected in a different image. This is an open problem. See also Interest Point Detection on Wikipedia

We try to simplify the problem at a low level and try to avoid conceptual mistakes by using theoretical examples.

  • As a simplification, ignore color, thus we have a grayscale image.
  • A patch of only white pixel is certainly not uniquely identifyable across a white wall. The scale, the rotation, simply everything except the color is ambigous. This is the "flat region" from your excerpt.
  • Suppose there's a straight black line of one pixel thickness in that local patch. Now you have some less ambigouty. If, for example, you find in another image a straight black line of thickness 2 pixel, it could be the same line, and the scale factor would be 2. However, where does the line start and where does it end? This, in general, is called "an edge".
  • A black cross from a horizontal and a vertical line, however, would be easy to identify with no ambigouty where the cross "starts" and "ends".
  • Similarly, a "corner", that is two lines end at a point, is a good feature to detect.

Thus the statement "Corners are great keypoints". However, there's also "blobs" and "ridges" (Types of image features on Wikipedia). The image gradient operator is a function that can highlight corner-like image regions.

  • Think of the gradient as the difference between two pixels. For a vertical line you get a peak in horizontal direction (high difference). For a horizontal line you get a peak in vertical direction.
  • Now if you apply this gradient operator to each pixel in the patch and build a histogram out of it, then the three cases that are mentioned in the excerpt apply.
  • Since the patch can appear rotated, you would typically first analyze a histogram of oriented gradients to find a major direction as the direction of the keypoint. And then see if there's a second peak in the orthogonal direction.
Eduard Feicho
  • 568
  • 4
  • 8