Can imregister provide transformation details on the registeration of the moving image?

조회 수: 44 (최근 30일)
I want to register and fuse two images, but I need to do some image processing of the images that I register, then use the translation and rotation details of the registration to fuse the unprocessed images. imregister only provides a transformed image, but no details on how it transformed it. Is there any way to get the details of the transformation to apply to my unprocessed images?
  댓글 수: 2
Anita
Anita 2013년 2월 27일
Richard, Can you please provide the modified imregister2 function which outputs tform?
Sean de Wolski
Sean de Wolski 2013년 2월 27일
@Anita, I believe you just have to add tform as an output:
[moving_ref, tform] = imregister2(varargin)
Then copy the rest of its contents.

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

채택된 답변

Sonoma Rich
Sonoma Rich 2012년 3월 20일
I modified imregister to return the "tform" object that it uses for the transformation. I then created a copy of "transformMovingImage", a function within imregister so I can call it.
[optimizer, metric] = imregconfig('multimodal');
[movingRegisteredProcessed, tform] = imregister2(movingProcessed,fixedProcessed,'rigid',optimizer,metric);
movingRegisteredUnprocessed = MyTransformMovingImage(movingUnprocessed, fixedUnprocessed, tform);
fused_image = imfuse(fixedUnprocessed,movingRegisteredUnprocessed,'blend');
This worked. It would be nice if the standard function provided the "tform" object.

추가 답변 (2개)

Alex Taylor
Alex Taylor 2013년 3월 14일
As of R2013a, users who want access to the geometric transformation estimate computed by imregister can call the function imregtform. The function imregtform returns a geometric transformation object that can be applied to the moving image using the new function imwarp.
The function imregister calls imregtform to obtain the geometric transformation that registers the moving image to the fixed image and then calls imwarp to produce the returned output image.
  댓글 수: 3
Sean de Wolski
Sean de Wolski 2013년 12월 19일
In R2013b, imregister just calls imregtform on the first line. So it will depend on what you pass in...
Alex Taylor
Alex Taylor 2013년 12월 21일
Yes, I'm quite sure. When you call imwarp with the output tform, you will need to specify an 'outputview' so that imwarp knows the location and resolution you want for the resampled image. In most registration problems in the default coordinate system, you will define the output spatial referencing option (assuming 2d) as:
MovingReg = imwarp(moving, tform, 'OutputView', imref2d(size( fixed)));
This is shown in the examples in the help and documentation for imregtform.

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


Ashish Uthama
Ashish Uthama 2012년 3월 20일
One possible approach:
If you add this parameter and value:
'DisplayOptimization',true
to your call, you'll notice that imregister displays the affine transform it uses with imtransform to perform the final registration.
  댓글 수: 1
Sonoma Rich
Sonoma Rich 2012년 3월 20일
I tried this, but I need the results as an object that I can work with it. This method just displays the transformation details, but I need to copy and paste it to use it.

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by