필터 지우기
필터 지우기

hi i am doing this assignment and i have no idea what does that mean or asking me to do?

조회 수: 3 (최근 30일)
When using correlation to detect objects in images, it may be that the size of the image represented by the search object does not match the size of the object in the image we are searching. To solve this problem, we can perform multi-scale analysis. Using the affine transform function imresize (used in Lecture/Tutorial 05) search the image searchSpace.bmp for the object contained in image mask searchObject.bmp. We will try with the mask at 1/4, 1/2, 1, 2, 3, and 4 times its loaded size. Keep track of the highest correlation every seen by checking the r value (retuned by corr2) at each location as we go along (for each image position and mask scale) and recording the value and location of the highest value for plotting at the end. Alternatively, you might calculate the Mean Square Error (MSE) between each image region and that object (mask) we are searching for.

답변 (1개)

Image Analyst
Image Analyst 2015년 12월 16일
Correlation is not robust to finding pattern. Normalized cross correlation is much better. I have a demo for that. Just run the attached demo in a loop where you do it 6 times, calling resize for each of the requested new sizes.
  댓글 수: 2
Muneef
Muneef 2015년 12월 16일
I dont really get it what is question demanding from me?
Image Analyst
Image Analyst 2015년 12월 16일
It's asking you to resize the searchObject at each iteration.
searchObject = imread('searchObject.bmp');
searchSpace = imread('searchSpace.bmp');
s = [1/4, 1/2, 1, 2, 3, 4]
for k = 1 : length(s)
searchSpaceResized = imresize(searchSpace, s(k));
out = normxcorr2(searchObject, searchSpaceResized);
imshow(out, []);
% Now do something with out.
end
I know they said something about corr2(), but the help says the two arrays must be the same size: "r = corr2(A,B) returns the correlation coefficient r between A and B, where A and B are matrices or vectors of the same size." normxcorr2() has no such limitations. I'd just take the mean value of out as a measure of the average correlation over the whole image.
You can use immse() which is the other suggestion/hint given by your question, but the images must be the same size.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Geometric 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