06-23-2009 06:23 PM
I'm building an application which can let users select muli-ROIs in one mage. In order to tell these ROIs, I need to either set different colors to different ROIs or label them (like ROI1 ROI2 ROI3). (I prefer label them but coloring will also do.) Could you show me how to achieve this? I have attached my code. My code can set muli-ROIs and display them but can't tell which one is which.
Thank you in advance.
06-23-2009 10:04 PM
I think that you will need to convert the ROI's to overlays which you can color-code. Look at the Overlay sub-pallet; IMAQ Overlay ROI might be a good place to start.
-cb
06-24-2009 12:25 AM
06-24-2009 11:47 AM
Hi,
Thank you for your input. However, by using overlay function it will destory the image, won't it? By the mean time, the image is updating at a video rate. So I'm looking for some methods other than Overlay ROIs or overlay text. The only purpose of the ROIs I'm using is to detect the pixel positions so that the application will use these positions to scan next image. Thanks.
06-25-2009 10:11 AM
Hello,
The overlay function does not destroy the image. If you want the image to permanently have the ROI defined, you would have to use the Merge Overlay function before it would be added to the image. I believe this document will answer your questions about the overlay functions:http://digital.ni.com/public.nsf/allkb/D04C5EF569F1023686256F4100558E7F?OpenDocument
-Zach
06-25-2009 03:44 PM
Hi Zach,
Thank you for your input. But if you use IMAQ Overlay ROIs, how can you remove a ROI once you set them? I use IMAQ Group ROIs to display all the ROIs I set and can simply remove any ones I don't want by delet the element of the ROIs array.
Thanks
06-26-2009 01:49 PM
04-19-2015 10:31 PM
I am having a similar question as the gentle man who initiated this post.
However, I need to not only distinguish multiple ROIs on the image, but also extract subimages from those ROIs I set for analysis. Obviously overlay does not work for me, for I have to move ROIs around to find the spots, then extract the subimages.
Thanks a lot!
Xiang