Giter Club home page Giter Club logo

enhance-image-and-extract-features-for-matching's Introduction

Context

  1. Image Blending
  2. Histogram Equalization
  3. Gaussian Filtering
  4. Median Filtering
  5. Bilinear Interpolation
  6. Edge Detection (Sobel operator)
  7. Edge Detection (Marr–Hildreth algorithm)
  8. Feature Matching

1. Image Blending

  • 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

imageA imageB result_blend

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

Unequalized_Hawkes_Bay_NZ

result

result_histEq

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

Lenna_salt_pepper result_GaussianFilter

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

Lenna_salt_pepper result_medianFilter

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

Lenna

result

result_bilinearInterpolation

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

Lenna result_SobelEdge

Sobel Edge Detector with Median Filter

result_SobelEdge_medianFilter

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

Lenna_salt_pepper result_ MarrHildrethEdge

8. Feature Matching

Orginal Image

Notre_Dame_1 Notre_Dame_2

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
    Cornerness_1 Cornerness_2
    The detected corner of the two images
    CornerDetection_1 CornerDetection_2

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)

FeatureMatching

Result (Distance ratio Threshold=0.63)

그림1

enhance-image-and-extract-features-for-matching's People

Contributors

jcdino avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.