Question regarding image registration.

1 visualización (últimos 30 días)
Chathu el 3 de Nov. de 2014
Respondida: Chathu el 4 de Nov. de 2014
I need to register some medical images which were taken by a regular video camera. But the images need a projective transformation due to differential skewing,scaling,translation and rotation. I used "cpselect" command. Brief description of my images are: inside a wax block(white in color), specific gland(brown in color) is present. I selected 4 corners of the wax block when using "cpselect" command. Unfortunately after running the code images are not registered properly.
Can you kindly help me out to correct this code or else show me an alternative path to register the images. Following is the code that i have used:
clc clear
A = imread('Pic1.jpg'); B = imread('Pic2.jpg'); cpselect(B,A)
subplot(221),imshow(A),title('Reference image') subplot(222),imshow(B),title('Moving image')
tform=cp2tform(input_points,base_points,'projective'); reg_out=imtransform(B,tform); subplot(223),imshow(reg_out),title('Registered image')

Respuestas (2)

Anand el 3 de Nov. de 2014
I can't make any comments on whether the approach you've used with cpselect is reasonable because I can't see the images or the control points you've selected.
As for alternatives, have you tried using the imregister function?
  1 comentario
Image Analyst
Image Analyst el 3 de Nov. de 2014
Because he has skewing, etc. should he look into imwarp() or the camera calibration stuff in the Computer Vision System Toolbox?

Iniciar sesión para comentar.

Chathu el 4 de Nov. de 2014
@ Anand- thank you for your response. imregister doesn't work for my images. Let me be more specific:Imagine a square where i have a specific gland within that square. Gland is in brown in color while the rest is white in color. Using cpselect- i selected 4 corners of the square. Since the images are off the scale,slanted,skewed i had to do a projective transformation. Though i used projective transformation, images were not registered properly. I wonder what is interferring for the image registration? Any thoughts?
@ Image Analyst: thank you for your reply. imwarp only works for MatLab2013a or later version, correct? Also, mathworks says cp2form is not recommended and they recommend fitgeotrans instead? Does Mathlab 2013a is compatible with that function?
Actually,in order to perform the image registration i need to do a point selection or else is there anyone who knows how to select a line along the border of the square, so then i can use that line detection to 4 sides of the square, same as cpselect.


Más información sobre Geometric Transformation and Image Registration en Help Center y File Exchange.


Community Treasure Hunt

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

Start Hunting!

Translated by