Jump to content

Not Rectangular Image to Image

Recommended Posts

   I have an application where I need to extract a portion of an Image, binarize with different threshold the two part of the original image and then merge them back.
To do so, at the moment, I trace a rectangle on the original Image, use two Mask from ROI VI to extract the inside and outside portions of the image and then I use the IMAQ ImagetoImage 2 VI  to merge the two parts.
This procedure works only with rectangular ROI, But I need to do the same with a define by user Polygon.
Any suggestion on How to do it?
In the attached example If you rotate the rectangle you can see my problem. The rotated rectangle seems to become a bigger rectangle. It seems to me that I need something like transparency to solve it....

Thank you so much!



Edited by Gepponline

Share this post

Link to post
Share on other sites

Per the "Details" section of the help here http://zone.ni.com/reference/en-XX/help/370281AE-01/imaqvision/imaq_imagetoimage_2/

I think you just need to reuse the mask you created earlier. If the ROI is a polygon, the mask will be a polygon so when you use imagetoimage it will only copy the pixels inside of the polygon.

Share this post

Link to post
Share on other sites

:(  My fault :)

It was not a strange Offset, it was a specific offest I was setting before using the mask and that I did not disconnect from the offset terminal :)
Now all work fine ;)
Thank you!

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.