Image registration, manual control point, FAIL
Afficher commentaires plus anciens
We are trying to use manual selection of control points to align two images. It failed for our image dramatically, while the demo works very well. In order to test it we placed four crosses on our image (using an image editor), then moved the four crosses and resaved as a second image. Then we load the two images into matlab, use the cpselect tool to place four control points (one on each cross). We then use cp2tform to construct a transform structure (it does not return any 'bad' points), finally we use imtransform to transform the second image. When we compare the reuslt is not aligned.
x = rgb2gray(imread('t1.jpg', 'JPG'));
y = rgb2gray(imread('t2.jpg', 'JPG'));
figure;
imshowpair(x,y,'ColorChannels','red-cyan')
cpselect(y,x);
inPtsCorr = cpcorr(y_points,x_points,y,x);
[tForm, input_points, base_points, input_points_bad, base_points_bad] = cp2tform (inPtsCorr, x_points, 'similarity');
tY = imtransform(y, tForm);
figure;
imshowpair(x,y,'ColorChannels','red-cyan')
figure;
imshowpair(x,tY,'ColorChannels','red-cyan')
Any suggestions? We are new to image processing and pretty stuck.
Thanks!
2 commentaires
Image Analyst
le 23 Juil 2013
Where did you upload your images to?
Karl
le 23 Juil 2013
Réponses (0)
Catégories
En savoir plus sur Geometric Transformation and Image Registration dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!