imregcorr() misaligns images badly
[tform, peakregcorr] = imregcorr(SourceImageAdj,SourceRef, …
TargetImageAdj,TargetRef, …
‘transformType’, ‘similarity’, …
‘Window’, true);
RegisteredImage = imwarp(SourceImageAdj,SourceRef, tform, ‘linear’, …
‘OutputView’, TargetRef);
disp(peakregcorr)
figure, imshowpair(TargetImageAdj,TargetRef,RegisteredImage, TargetRef)
above is my code to correlate 2 images of different sizes. the goal is to find the correlation between the images to determine what pixel location a point of interest might lie in both images. However, imregcorr consistently misses the mark badly.
Whereas the code above might output a tform object – Dimensionality: 2, Scale: 0.4254, RotationAngle: 2.4851, Translation: [-0.3269 -0.0904]
A more correct tform object (based upon the output image would look like – Dimensionality: 2, Scale: 1, RotationAngle: -1, Translation: [0.0640 0]
The SourceRef and TargetRef seem correct, so Im not sure what is causing the issue[tform, peakregcorr] = imregcorr(SourceImageAdj,SourceRef, …
TargetImageAdj,TargetRef, …
‘transformType’, ‘similarity’, …
‘Window’, true);
RegisteredImage = imwarp(SourceImageAdj,SourceRef, tform, ‘linear’, …
‘OutputView’, TargetRef);
disp(peakregcorr)
figure, imshowpair(TargetImageAdj,TargetRef,RegisteredImage, TargetRef)
above is my code to correlate 2 images of different sizes. the goal is to find the correlation between the images to determine what pixel location a point of interest might lie in both images. However, imregcorr consistently misses the mark badly.
Whereas the code above might output a tform object – Dimensionality: 2, Scale: 0.4254, RotationAngle: 2.4851, Translation: [-0.3269 -0.0904]
A more correct tform object (based upon the output image would look like – Dimensionality: 2, Scale: 1, RotationAngle: -1, Translation: [0.0640 0]
The SourceRef and TargetRef seem correct, so Im not sure what is causing the issue [tform, peakregcorr] = imregcorr(SourceImageAdj,SourceRef, …
TargetImageAdj,TargetRef, …
‘transformType’, ‘similarity’, …
‘Window’, true);
RegisteredImage = imwarp(SourceImageAdj,SourceRef, tform, ‘linear’, …
‘OutputView’, TargetRef);
disp(peakregcorr)
figure, imshowpair(TargetImageAdj,TargetRef,RegisteredImage, TargetRef)
above is my code to correlate 2 images of different sizes. the goal is to find the correlation between the images to determine what pixel location a point of interest might lie in both images. However, imregcorr consistently misses the mark badly.
Whereas the code above might output a tform object – Dimensionality: 2, Scale: 0.4254, RotationAngle: 2.4851, Translation: [-0.3269 -0.0904]
A more correct tform object (based upon the output image would look like – Dimensionality: 2, Scale: 1, RotationAngle: -1, Translation: [0.0640 0]
The SourceRef and TargetRef seem correct, so Im not sure what is causing the issue image processing MATLAB Answers — New Questions