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:
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')