How to stitch overlapping images correctly?

8 ビュー (過去 30 日間)
Sreerup Banerjee
Sreerup Banerjee 2017 年 10 月 3 日
コメント済み: Sreerup Banerjee 2017 年 10 月 5 日
I intend to stitch several overlapping images, I have started with two of them. The functions imregconfig and imregister seem to rotate the image perfectly. But still a bit of translation is needed to get a correct image registration. I have attached results before and after image registration. How can it be achieved so that I get a stitched image?
Here is the relevant portion of the code:
im1=im1(1:2:end,1:2:end,:); im2=im2(1:2:end,1:2:end,:);
grayImage1 = rgb2gray(im1); grayImage2 = rgb2gray(im2);
grayImage1 = medfilt2(grayImage1,[3 3]); grayImage2 = medfilt2(grayImage2,[3 3]);
[optimizer, metric] = imregconfig('monomodal');
grayImage2= imregister(grayImage2,grayImage1,'affine',optimizer,metric);
figure; imshowpair(im1,im2,'blend')
figure, imshowpair(grayImage1,grayImage2,'blend');

回答 (1 件)

Image Analyst
Image Analyst 2017 年 10 月 3 日
  1 件のコメント
Sreerup Banerjee
Sreerup Banerjee 2017 年 10 月 5 日
Hi! Many thanks for the answer. Does it mean that imregister should only be used when the overlap between two images are considerable?
In the first link you have provided, it requires mouse click to select point on the images. As the final algorithm will involve nearly 500 images, so the image registration has to be automatic.
I have tried the second algorithm earlier. It gives warning "Matrix is close to singular or badly scaled. Results may be inaccurate." and indeed the results are inaccurate.

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

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by