72 min total

Computer Vision & OpenCV

Interest points and corner detection

Interest points and corner detection
Local image surface around an interest point

Interest point: the point at which direction of boundary of object changes abruptly. Used for:

  • image matching
  • object recognition
  • object tracking.

Interest Points can still be detected even if the image undergoes various transformations(rotation, scaling, lighting)

Good interest point detector properties:

  • detect most true interest points
  • No false interest points
  • Well localized
  • Robust against noise

Approaches to corner detection

  • Brightness based methods: analyze image intensity to locate interest points
  • Boundary extraction methods: first perform edge detection to extract object boundaries, analyze the curvature of detected edges to find corners

Applications of interest points:

  • Automated object tracking
  • Depth estimation
  • Stereo calibration by aligning multiple camera views
  • Motion based segmentation of moving objects from static bg's
  • 3D object reconstruction from 2D images
  • Assisting robots in navigating environments
  • Efficient search and retrieval of image from databases
Corresponding patches on two stop signs

Correspondence across views

Correspondence matches the same physical points across images taken from different viewpoints.

Stereo vision: uses two cameras to capture images of same scene from different viewports, calculates depth information enabling 3D reconstruction of the scene. Estimates fundamental matrix

Feature correspondences between two views

The fundamental matrix describes epipolar geometry between two views. A point in one image constrains its corresponding point in the other image to an epipolar line.

The fundamental matrix F is a 3×3 matrix. In homogeneous coordinates, corresponding image points x and x′ satisfy the epipolar constraint:

Keypoints: subset of interest points that are described by feature descriptors and used for recognition tasks.

Keypoint matching

  • Detect distinct keypoints in an image
  • Define a region (patch) around each detected keypoint.
  • Extract and normalize region (patch) content
  • Compute numerical vector (local descriptor) to summarize patch content
  • Match local descriptors using similarity measures

Keypoints Goals:

  • interest operator repeatability - Should be repeatable (consistent under different conditions e.g. rotation, scale)
  • Descriptor distinctiveness - Unique enough to allow precise matching across images.
Design goalBenefit
Repeatable interest pointsRobust detection and precise localization
More detected pointsRobustness to occlusion and less reliance on texture
Distinctive patchesFewer incorrect matches
Flexible descriptorsTolerance to expected variations and more correct matches
Interest-point and descriptor trade-offs

The arrows show competing design goals. More repeatable points favor reliable detection and localization; more detected points improve coverage under occlusion or weak texture. Distinctive patches reduce wrong matches, while flexible descriptors tolerate expected changes and retain more correct matches.

Occlusion: object is partially blocked/hidden from view

Tradeoffs of interest points

Repeatable interest points support robust matching. Detecting more points can improve coverage under occlusion or weak texture, but can also introduce less distinctive candidates.

Local feature descriptors match image regions

Tradeoffs of patches:

  • more unique patches - minimizes wrong matches, fails to match changes in viewports, scale, lighting
  • more flexible patches - robust to changes in viewports, scale, lighting but increases false matches.

Invariant local features remain comparable under the transformations that the detector and descriptor are designed to tolerate.

Window shifts in flat, edge, and corner regions

The Harris detector identifies corners using local image gradients.

Aperture problem: Harris corner detector relies on local intensity gradients within a small window. If window only contains an edge, motion along the edge is uncertain. If the window contains a corner, motion is well-defined and a strong corner is detected

A convolution response uses the kernel flipped in both spatial directions.

Image and reversed filter coefficients in a convolution response

Correlation

Correlation measures similarity between an image and a template.

Autocorrelation measures the similarity of an image to a shifted copy of itself.

Correlation vs Sum of Squared Differences (SSD)

SSD is small when two patches match; correlation is high when they align. Their equivalence requires controlling the patch energies, for example through normalization.

From patch shifts to the structure tensor

A first-order Taylor approximation of the shifted image gives:

When M is positive definite, equal-cost contours are ellipses. Its two eigenvalues describe sensitivity to shifts along the principal directions.

Connection to optical flow

Brightness constancy and a first-order expansion imply:

Harris derivation without skipped algebra

For positive-definite M, equal-cost contours are ellipses; λ₁ and λ₂ are its eigenvalues. Flat regions and edges may produce degenerate contours.

Optical-flow expansion