Implement a function that creates a composite image from two images, im1 and im2.
The function has three inputs (im1, im2, α) and one output (result).
result = α⋅im1+(1−α)⋅im2!
im1 im2 result
2. Histogram Equalization
Implement a function that processes histogram equalization.
The function has two inputs (im, n) and one output (result).
“n” is the number of levels of the histogram.
original
result
3. Gaussian Filtering
Implement a function that processes Gaussian filtering on an image using a Gaussian filter.
The function has two inputs (im, σ) and one output (result).
σ: standard deviation of Gaussian filter
The size of filter: (2×⌈2σ⌉+1 by 2×⌈2σ⌉+1)
For boundary region, if a pixel is out of image, assume the pixel has the same intensity with the closest pixel
original result
4. Median Filtering
Implement a function that processes median filtering on an image.
The function has two inputs (im, filterSize) and one output (result).
For boundary region, if a pixel is out of image, assume the pixel has the same intensity with the closest pixel.
original result
5. Bilinear Interpolation
Implement a function that processes bilinear interpolation to increase the size of an image.
The function has two inputs (im, scale) and one output (result).
For elements at right-end and bottom-end, assume the pixel has the same intensity with the closest pixel.
original
result
6. Edge Detection (Sobel operator)
Implement a function that detects edges using Sobel operator on an image.
The function has one input (im) and one output (result).
The output of the function should be the magnitude of the gradient of an input image.
For boundary region, if a pixel is out of image, assume the pixel has the same intensity with the closest pixel.
original Sobel Edge Detector
Sobel Edge Detector with Median Filter
7. Edge Detection (Marr–Hildreth algorithm)
Implement a function that detects edges using the Marr–Hildreth algorithm on an image.
The function has three inputs (im, σ, threshold) and one output (result).
The output of the function should be a binary edge map.
σ: standard deviation of Gaussian filter.
threshold: threshold for zero-crossing.
Size of LoG filter: (2×⌈3σ⌉+1 by 2×⌈3σ⌉+1)
For boundary region, if a pixel is out of image, assume the pixel has the same intensity with the closest pixel.
original result
8. Feature Matching
Orginal Image
Harris Corner Detector
Implement a function “detectHarrisCorner” that detects interest points using the Harris corner detection algorithm on an image.
The function has seven inputs (im, fx_operator, fy_operator, Gaussian_sigma, alpha, C_thres, NMS_ws) and two outputs (corner, C).
The output “corner” should contain [x, y] coordinates of interest points.
The output “C” should contain a cornerness score map which has the same size as the input image.
im: input image.
fx_operator, fy_operator: vector to use to compute derivatives along x-direction and y-direction.
Gaussian_sigma: standard deviation of Gaussian filter for filtering squares/products of the derivative maps.
alpha: for the cornerness score map.
C_thres: threshold for the cornerness score map.
NMS_ws: window size for non-maximum suppression.
Size of Gaussian filter: (2×⌈2σ⌉+1 by 2×⌈2σ⌉+1).
For boundary region, ignore interest points (in 8 pixels from any boundary).
The cornerness of the two images
The detected corner of the two images
SIFT Descriptor
Implement a function “extractSIFT” that extracts SIFT features using the Scale Invariant Feature Transform (SIFT) algorithm around interest points.
The function has five inputs (im, fx_operator, fy_operator, corner, Gaussian_sigma) and one output (SIFT).
The output “SIFT” should contain SIFT features for all “corner” points. (size: # of corner X 128) image.
im: input image.
fx_operator, fy_operator: vector to use to compute derivatives along x-direction and y-direction.
corner: from “detectHarrisCorner”.
Gaussian_sigma: standard deviation of the Gaussian filter for filtering the magnitude of the gradient.
Size of Gaussian filter: (16×16).
For boundary region, ignore interest points (in 8 pixels from any boundary).
Feature Matching using Distance Ratio
Implement a function “matchFeatures” that matches SIFT features using the nearest neighbor distance ratio algorithm between two images.
The function has two inputs (SIFT1, SIFT2) and one output (matching).
The output “matching” should contain two columns. The first column should contain the index of matched interest points from image 2. The second column should contain distance ratios. (size: # of corners in SIFT1 X 2)
SIFT1, SIFT2: from “extractSIFT”.
Result (Distance ratio Threshold=0.5)
Result (Distance ratio Threshold=0.63)
enhance-image-and-extract-features-for-matching's People