Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

extract the overlay portion of an image

i use the IMAQ overlay Retangle.vi to the image,and then i want to extract the portion inside the retangle to process,how can i do it?

thanks

0 Kudos
Message 1 of 16
(4,794 Views)
You can use Imaq extract vi for this purpose.Just feed the rectangle co-ordiantes (top,left bottom and right) defining the region to be extracted
0 Kudos
Message 2 of 16
(4,792 Views)
Message Edited by muks on 10-16-2008 03:58 AM
0 Kudos
Message 3 of 16
(4,791 Views)

but if it is a rotated retangle(such as rotated 45° ),it can not work well as you said

 

 

帖子被skyover在 10-16-2008 05:16 AM
时编辑过了
0 Kudos
Message 4 of 16
(4,778 Views)

please see my another POST "How to overlay a part of image with inclined retangle "

How to overlay a part of image with inclined retangle

帖子被skyover在 10-16-2008 05:25 AM
时编辑过了
0 Kudos
Message 5 of 16
(4,771 Views)
If it the continuation with the same question then why start a new thread?
0 Kudos
Message 6 of 16
(4,768 Views)
My suggestion would if can get the angle then rotate the image by reference to that angle and then extract.
0 Kudos
Message 7 of 16
(4,767 Views)

Hi!

 

Same trouble!! I need a function so that it can extract a rotated rectangle. Extract.vi only returns a part of an image parallel to X and Y axis. I'd like to get one function that you can pass 4 point (coordinates) and maybe an angle of rotation so you get a rotated rentangle.

 

I know IMAQ rotate.vi does exists but it doesn't help, I need what I told before!!

 

Thanks 

 

0 Kudos
Message 8 of 16
(4,370 Views)

Same trouble!! I need a function so that it can extract a rotated rectangle. Extract.vi only returns a part of an image parallel to X and Y axis. I'd like to get one function that you can pass 4 point (coordinates) and maybe an angle of rotation so you get a rotated rentangle.

 

I know IMAQ rotate.vi does exists but it doesn't help, I need what I told before!!


How do you say the rotate will not help here?
0 Kudos
Message 9 of 16
(4,365 Views)

Hi, Greg,

 

Do not search "ready-for-use-super-puper-universal-tool", just use suggested functions in combination:

Just starting point for you:

 

bd.png

 

And result:

 

fp.png

 

Now you have two images - one is extracted and masked (areas outside of rotated rectangle are filled with black. The second image is rotated and cropped to size of the original rotated rectangle. I have used fixed coords, but they should be calculated based on original size and angle (simple arithmetic).

 

best regards,

 

Andrey.

 

0 Kudos
Message 10 of 16
(4,339 Views)