LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ROI

Hi,

How can i determine the ROI of the image using 'IVA Mask from ROI.vi'?

Cheers
0 Kudos
Message 1 of 8
(3,121 Views)
Hello,

Thank you for your post.

I'm not sure how far you have got with your VI, but here's a method of retro-fitting a ROI into your program.

- Build a new script using Vision Assistant using only acquisition and an 'Image Mask from ROI' step

- Acquire your desired image and specify your ROI

- Create a new VI from this script (Tools >> Create LabVIEW VI...)

- A cluster (including two arrays) of suitable data will be generated within the new LabVIEW code. The top (blue) array is your ROI data . The lower array (pink with blue insert) is your mask data with a similar format to the ROI, but with masking specifics added . You can then copy and paste this cluster into the VI you're developing.

This design would obviously only give you a 'picture-specific' ROI. You would have to manually modify your array if you wished to change the ROI for any reason. Bear in mind also, if you change the ROI values in the cluster, then you must change the numeric values in the Mask array also. If you do not your image may contain a large portion of black pixels where the image has been 'cut off'.

This should give you a good starting point, but if you have any further questions then please let me know.

Many thanks,
National Instruments | Northern California
0 Kudos
Message 2 of 8
(3,064 Views)
Hello again,

Please find attached some example code. This code takes an 8-bit image and allows you to specify the ROI, and subsequently the mask, by clicking and dragging a rectangle around the desired portion of the image.
This should give you a stronger starting point to further develope your VI.
If you have any issues please let me know.

Thanks,
National Instruments | Northern California
0 Kudos
Message 3 of 8
(3,056 Views)
The code, as promised:
National Instruments | Northern California
0 Kudos
Message 4 of 8
(3,056 Views)
Thanks for the guideline.

Can I just send you my code in private because i need a little bit alteration with the code and i just can't think about it anymore.

Cheers.
0 Kudos
Message 5 of 8
(3,048 Views)
If you could post your email address on the forum I'll send out an email that you can reply to.

Ta!
National Instruments | Northern California
0 Kudos
Message 6 of 8
(3,045 Views)
Hi

My email add. is:

senduk69@yahoo.com

cheers
0 Kudos
Message 7 of 8
(3,040 Views)
Hi Rob,

How to link image from MAX into LabVIEW. In other words i want to retrieve image from MAX into LabVIEW for further image processing. For your info. the source of the image is coming from VCR player.

Cheers
0 Kudos
Message 8 of 8
(2,957 Views)