Gepponline Posted January 14, 2019 Report Share Posted January 14, 2019 (edited) Hi, 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! Main.zip Edited January 15, 2019 by Gepponline Quote Link to comment
smithd Posted January 15, 2019 Report Share Posted January 15, 2019 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. Quote Link to comment
Gepponline Posted January 15, 2019 Author Report Share Posted January 15, 2019 This is s what I'm trying to do using the Image Mask input of ImagetoImage VI but If I do so, as you can see in attached file, in the result, the inside part of the image has a strange offset... unisci immagini FINALE.vi Quote Link to comment
Gepponline Posted January 15, 2019 Author Report Share Posted January 15, 2019 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! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.