Align pre- and post- scans using imregister

조회 수: 17 (최근 30일)
Julia
Julia 2014년 7월 22일
편집: Julia 2014년 7월 22일
I am trying to align pre- and post treatment scans in order to highlight the differences. After adding a contrast agent there are more structures visible and I want to display just these ones that occur in the post scan, but not in the pre scan. I have attached both scans. Eventually I will work with 3D matrices. I am rotating the post scan and get close to a match, but despite using the command imregister I can't get the two pictures to fully match. I am using the following commands and am happy for any hints and recommendations. Thanks.
A= imread('11Tpre (296).jpg');
A = rgb2gray (A);
A = imcrop (A,[345 390 1179 1179]); %cropping image to a 1180 x 1180
B= imread('11Tpost (272).jpg');
B = rgb2gray (B);
B = imcrop (B,[435 370 1179 1179]); %cropping image to a 1180 x 1180
B = imrotate (B, 27.2,'bilinear', 'crop')
figure
imshow (A)
figure
imshow(B)
% View misaligned images
imshowpair(A,B,'Scaling','joint');
% Get a configuration suitable for registering images from different
% sensors.
[optimizer, metric] = imregconfig('multimodal')
% Tune the properties of the optimizer to get the problem to converge
% on a global maxima and to allow for more iterations.
optimizer.InitialRadius = 0.009;
optimizer.Epsilon = 1.5e-4;
optimizer.GrowthFactor = 1.01;
optimizer.MaximumIterations = 300;
% Align the moving image with the fixed image
Breg = imregister (B,A,'affine', optimizer, metric);
% View registered images
figure
imshowpair(A,Breg,'Scaling','joint');

답변 (0개)

카테고리

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