Why imregister is not performing well?
조회 수: 2 (최근 30일)
이전 댓글 표시
I get this code
fixed = dicomread('test1.dcm')
moving = dicomread('test3.dcm')
imshowpair(fixed,moving,'Scaling','joint')
[optimizer, metric] = imregconfig('multimodal')
optimizer.InitialRadius = 0.009;
optimizer.Epsilon = 1.5e-4;
optimizer.GrowthFactor = 1.01;
optimizer.MaximumIterations = 300;
movingRegistered = imregister(moving, fixed, 'affine', optimizer, metric);
figure
imshowpair(fixed, movingRegistered,'Scaling','joint')
I get the error "The value of 'MovingImage' is invalid. All dimensions of the moving image should be greater than 4."
What is wrong? Please, help!!!
댓글 수: 0
채택된 답변
lokender Rawat
2018년 5월 8일
편집: lokender Rawat
2018년 5월 8일
This is a limitation of the 'imregister' function. The local minimum 'imregister' finds during calculation often does not correspond to the global minimum for this type of image. Specifically, when the image is circularly symmetric (which may confuse the rotation estimation). Using more local features (such as with MSER regions) is likely to be a better approach.
However, you can try to convert the images to grayscale images (using rgb2gray) and then use 'imregister' function(as it expects grayscale arguments). Read the below documentation:
imregister (rgb2gray(moving), rgb2gray(fixed), 'affine', optimizer, metric);
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!