Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Block Area from Rotated Image

I am doing a project on Image Registration.
I used phase correlation technique to calculate the translational parameter.
I also got the rotation angle of the image using "IMAQ Find Pattern.vi". But my problem is when I rotated the image in opposite angle to recover the rotation it pads block area (Pads zeros)(to avoid information loss). So when I used that image for phase correlation it gives wrong results because of that block area.

Please download the attachement " Test_Images.zip " before analyzing my problem.

'Original.jpg' is the original image.
'Part_1.jpg' is the part of the image taken from 'Original.jpg'
'Original_30.jpg' is the rotated version of 'Original.jpg' (30 degree in Clockwise direction).
'Rotate_30.jpg' is the part of the image taken from 'Original_30.jpg'

'Part_1.jpg' And 'Rotate_30.jpg' have some common part (Near the wheel of the car).

Using 'IMAQ Find Pattern.vi' , I am able to get the rotation angle.

I Used 'IMAQ Rotate.vi ' to nullify the rotation of image (Rotate_30.jpg) to register with the first image (Part_1.jpg) (i.e Rotate 'Rotate_30.jpg' -30 Degree OR 30 Degree in anti clockwise direction)

'Recovered_30.jpg' is the result of 'IMAQ Rotate.vi ' operation.

But as we can see in the image 'Recovered_30.jpg' the above said operation pads 'Black Area' to the rotated image.

So while attempting to register images (Part_1.jpg and Recovered_30.jpg) it gives error.(i.e I am getting wrong result).

So I want to remove that black part from the 'Recovered_30.jpg' image.

Please help me to solve this problem.
If you have any other idea please let me know

Thanking you
AKSHARA.T.G
0 Kudos
Message 1 of 6
(3,513 Views)
Akshara,

I have several suggestions for you for removing the black fill-in regions on the image:

1) The IMAQ Rotate function has an input called "Replace Value" that can be used to specify what pixel intensity will be used for regions of the rotated image that do not have corresponding values in the original image. So, you can specify that the area becomes white, black, or any intermediate shade of gray.

2) If you are only looking for a specific part in the image, you could try creating a mask to remove the majority of the image beyond the portion located by the pattern match. This would remove the bulk of the image, leaving only the region with the part that you are looking for. You could also try this after you have rotated the image, leaving only a smaller area that shows the part that you are trying to find.

3) You could also try converting the image into an array and then searching for and replacing all pixels with an intensity of 0 with some other value.

Try these suggestions and let me know if you have any additional questions on this issue.

Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,497 Views)

HI, I am doing a project on image processing. I want to konw the rotating angle for my image. So I want to know something about the "IMAQ Find Pattern.vi".  I fail to find it in the examples of labview 8.6. Can you mail the "IMAQ Find Pattern.vi" to me ? My e-mail is xuyifeng_0126@163.com .Thank you !

 

  Melo_xu      

0 Kudos
Message 3 of 6
(3,140 Views)
Why cant you start a new thread? I doubt whether you have installed Vision development module (VDM). Have you? If you install VDM then you will have this vi.
0 Kudos
Message 4 of 6
(3,134 Views)

I am sure that I have  installed Vision development module (VDM). But I can't find this VI.T_T   Can you mail this VI to me ? This VI is so important for me . Thank you very much!

 

melo_xu

0 Kudos
Message 5 of 6
(3,131 Views)
0 Kudos
Message 6 of 6
(3,121 Views)