Problem with "imregister" function
이전 댓글 표시
Hello,
I'm trying to use the imregister function to register two pictures. To get some experience with this function I did nothing else than typing in the code I found on http://www.mathworks.de/de/help/images/ref/imregconfig.html (Open: Examples). My code than looked like that:
fixed = imread('foto.jpg');
moving = imrotate(fixed, 5, 'bilinear', 'crop');
imshowpair(fixed, moving,'Scaling','joint');
[optimizer, metric] = imregconfig('monomodal');
movingRegistered = imregister(moving,fixed,'rigid',optimizer, metric);
After that I get the Error: Error using imregister>parseInputs (line 208) Argument 'MovingImage' failed validation with error: All dimensions of the moving image should be greater than 4.
Error in imregister (line 91) parsedInputs = parseInputs(varargin{:});
Please help me. Thank You.
댓글 수: 3
Ashish Uthama
2013년 9월 26일
what does
size(moving)
size(fixed)
say? Are each dimension of the image greater than 4?
sathiya sankari T.V
2015년 8월 20일
how to check the dimension of the image?.In properties it shows the dimension is 225*225.
채택된 답변
추가 답변 (2개)
Adrian
2013년 8월 23일
0 개 추천
댓글 수: 1
Yazan Awwad
2013년 9월 25일
Hi, I am trying to register two images using imregister as well. I get the same error as urs. I was wondering if u were able to figure out how to get rid of this error. Please let me know. Thank you, Yazan
Image Analyst
2013년 9월 25일
편집: Image Analyst
2013년 9월 25일
0 개 추천
It ran for me with no problem, once I changed to the standard demo image cameraman.tif. You obviously have a lot more stuff going on that you didn't show us because the error showed up on line 91 but you didn't post 91 lines of code.
댓글 수: 4
Adrian
2013년 9월 26일
Image Analyst
2013년 9월 26일
편집: Image Analyst
2013년 9월 26일
Perhaps it doesn't work with color images (I haven't tried that). If not, do one color channel at a time.
Adrian
2013년 9월 26일
카테고리
도움말 센터 및 File Exchange에서 Image Registration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!