Image registration, manual control point, FAIL

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 件のコメント

Image Analyst
Image Analyst 2013 年 7 月 23 日
Where did you upload your images to?

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGeometric Transformation and Image Registration についてさらに検索

質問済み:

2013 年 7 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by