Match the points in two different image?

18 views (last 30 days)
Hello, I am student working on Image processing. Right now I am taking a picture from camera and converting to threshold(black/white). Its a pictire of night skt with stars. So ultimatly I am having white spots on black background. The problem is that I want to select 3 stars from that picture that to automatic how to do that????. After that I will take another picture in that also the same 3 stars will be present. So how can i select same three stars in next time for further processing???? Final aim is how the position of the stars changed when we change the camera orientation. Any help will be appreciated.........

Accepted Answer

Bruno Pop-Stefanov
Bruno Pop-Stefanov on 21 Nov 2013
There are several kinds of features that you can try to extract and match between two images. For example, SIFT, SURF, Harris corners, and more. The Computer Vision System toolbox allows you to extract features and match them using the RANSAC algorithm. Here is an example using Harris corners:
Find the corresponding interest points between a pair of images using local neighborhoods and the Harris algorithm.
Read the stereo images.
I1 = rgb2gray(imread('viprectification_deskLeft.png'));
I2 = rgb2gray(imread('viprectification_deskRight.png'));
Find the corners.
points1 = detectHarrisFeatures(I1);
points2 = detectHarrisFeatures(I2);
Extract the neighborhood features.
[features1, valid_points1] = extractFeatures(I1, points1);
[features2, valid_points2] = extractFeatures(I2, points2);
Match the features.
indexPairs = matchFeatures(features1, features2);
Retrieve the locations of corresponding points for each image.
matched_points1 = valid_points1(indexPairs(:, 1), :);
matched_points2 = valid_points2(indexPairs(:, 2), :);
Visualize corresponding points. You can see the effect of translation between the two images despite several erroneous matches.
figure; showMatchedFeatures(I1, I2, matched_points1, matched_points2);
You can find more information here: Feature Detection, Extraction, and Matching
  1 Comment
Wajahat Nawaz
Wajahat Nawaz on 30 Oct 2015
but when we take two images one is taken from 1000f heiht and other from 2000f height it show wrong matching..

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 21 Nov 2013
The algorithm that (I think) was used first to do this in astronomy is the Groth algorithm. It has been used/adapted for things like identifying polar bears and whale sharks by their spot patterns. http://spinoff.nasa.gov/Spinoff2009/er_1.html.
But for a simple thing to start, why not just try imregister() in the Image Processing Toolbox?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!