How can i find the position of a subimage in larger image ?

8 ビュー (過去 30 日間)
Mariem Harmassi
Mariem Harmassi 2013 年 2 月 13 日
回答済み: Image Analyst 2015 年 11 月 7 日
Hello I have a sub-image X ,which is a subimage of Y .How can find the position of this subiamge in the image Y ? Can anyone help me

採用された回答

Thorsten
Thorsten 2013 年 2 月 13 日
F = im2double(imread('cameraman.tif'));
I = rand(512);
I([1:size(F,1)] + 30, [1:size(F,2)] + 80) = F;
disp('Search target using imfilter, this may take some time...')
If = imfilter(I, F);
[maxval ind] = max(If(:));
[y x] = ind2sub(size(If), ind);
imshow(I)
hold on
plot(x, y, 'rx')

その他の回答 (1 件)

Image Analyst
Image Analyst 2015 年 11 月 7 日
Use normxcorr2(). See my demo of it, attached.

カテゴリ

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