Answer:
1. Harris Corner Detector - Working Principle (6 Marks)
The Harris corner detector aims to identify corners in an image, which are points where image intensity varies significantly in multiple directions within a local neighborhood. Unlike edges (intensity change in one direction) or flat regions (little change), corners provide stable, localized features. The principle involves analyzing the local intensity structure using the second-moment autocorrelation matrix (also known as the Harris matrix or structure tensor).
Steps:
- Compute Image Gradients: Calculate the spatial derivatives of the image intensity, and , typically using filters like Sobel or simple differences.
- Compute Products of Derivatives: For each pixel, calculate the products of these gradients: , , and .
- Windowed Summation (Autocorrelation Matrix): Define a window (e.g., or , often weighted by a Gaussian ) around each pixel . Compute the sums of the derivative products within this window to form the Harris matrix (or ): This symmetric matrix summarizes the gradient distribution within the local window.
- Corner Response Calculation: Analyzing the eigenvalues () of reveals the nature of the region:
- Flat: ,
- Edge: or
- Corner: and are both large and similar in magnitude. To avoid explicit eigenvalue computation, Harris and Stephens proposed a corner response function : where and . is an empirical sensitivity factor (typically to ).
- is large and positive for corners.
- is negative for edges.
- is small for flat regions.
- Thresholding and Non-Maximum Suppression (NMS):
- Apply a threshold to the response map . Only pixels with are considered potential corners.
- Apply Non-Maximum Suppression: In a local neighborhood around each potential corner point, keep only the point with the maximum value, suppressing the others. This yields well-localized corner points.
2. Salient Properties of Harris Corner Detector (3 Marks)
- Rotation Invariance: The detector response depends on the eigenvalues (via det and trace), which are invariant to rotation of the coordinate system. Thus, the detector finds the same corners regardless of image rotation.
- Partial Illumination Invariance: It is relatively robust to changes in image brightness (additive illumination changes) because it relies on gradients. However, it is sensitive to contrast changes (multiplicative changes).
- Not Scale Invariant: This is a major limitation. The detector operates at a single scale defined by the window size used for gradient calculation and summation. A corner might not be detected if the image scale changes significantly.
3. Working Principle of SIFT (Scale-Invariant Feature Transform) Operator (6 Marks)
SIFT is a comprehensive algorithm designed to detect and describe local image features in a way that is robust to changes in scale, rotation, illumination, and moderate viewpoint changes. It consists of four main stages:
-
Scale-Space Extrema Detection:
- Goal: Find potential keypoint locations that are stable across different scales.
- Method: The image is progressively blurred using Gaussian filters with increasing standard deviation (). These blurred images form a scale-space. To efficiently detect stable blob-like structures, the Difference-of-Gaussian (DoG) function is computed by subtracting adjacent Gaussian-blurred images: . DoG is an approximation of the scale-normalized Laplacian of Gaussian ().
- Detection: Local extrema (maxima and minima) of the DoG images are detected by comparing a pixel to its 26 neighbours in 3D (8 in the same scale, 9 in the scale above, 9 in the scale below). These extrema locations are candidate keypoints.
-
Keypoint Localization:
- Goal: Refine the location of candidate keypoints and eliminate unstable ones (low contrast or edge responses).
- Refinement: A 3D quadratic function is fitted to the DoG scale-space around the candidate keypoint to determine its sub-pixel and sub-scale location more accurately.
- Low Contrast Rejection: Keypoints with a low DoG function value at the refined extremum are discarded as they are sensitive to noise. (e.g., 0.03).
- Edge Response Elimination: Keypoints lying on edges are unstable. The ratio of principal curvatures (derived from a Hessian matrix computed at the keypoint location and scale) is used. If the ratio is above a threshold (e.g., 10), indicating one curvature is much larger than the other, the keypoint is rejected. .
-
Orientation Assignment:
- Goal: Assign one or more orientations to each keypoint based on local image gradient directions to achieve rotation invariance for the descriptor.
- Method: For each keypoint, consider a neighborhood around it at its detected scale (). Compute gradient magnitudes and orientations for all pixels in this neighborhood. Create an orientation histogram (typically 36 bins). Each sample added to the histogram is weighted by its gradient magnitude and by a Gaussian window centered at the keypoint.
- Assignment: The highest peak in the histogram determines the dominant orientation. Any other peaks above 80% of the highest peak also generate a keypoint with that orientation, allowing for multiple orientations at a single location/scale.
-
Keypoint Descriptor Generation:
- Goal: Create a highly distinctive and robust descriptor for the local region around the keypoint.
- Method: Take a pixel neighborhood around the keypoint, rotated to align with the assigned orientation(s). Divide this neighborhood into a grid of subregions. For each subregion, compute an 8-bin histogram of gradient orientations (relative to the keypoint orientation), weighted by gradient magnitudes and a Gaussian centered on the keypoint.
- Vector: Concatenate these 16 histograms () into a single 128-dimensional feature vector.
- Normalization: Normalize the vector to unit length for illumination invariance (contrast). Threshold large values (e.g., > 0.2) and re-normalize to reduce the effects of non-linear illumination changes. This final 128-D vector is the SIFT descriptor.