LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Region of Interest (ROI) on Intensity Graph

Hello,

I hope somebody can help me.  I have read the other posts available regarding choosing ROIs on intensity graphs but they don't really answer my question.

I am taking a series of still images.  Having stored the image as an array and displayed it on the intensity graph, I need some way of selecting a rectangular ROI (preferably with mouse) to define an array subset and performing max/min/mean/standard deviation measurements on this region.  I am aware that the array would need reshaping to work with the in built VI for mean and standard deviation but cannot seem to find a way to may the selection of the array subset in the first place.

I would be very grateful for any pointers

Sarah Bohndiek
0 Kudos
Message 1 of 4
(6,053 Views)

Hi,

  since you're using an intensity graph, you could use an event structure to capture for the mouse down and mouse up events.

They both give you the coords of where the mouse was. The nex trick would be to convert that into array position co-ordinates, which requires knowing how the data is presented in the graph (actual graph area size, and the amount of data passed to it.) It's easy enough to get the size of the plot area, and you can get the position of the control itself, however calculating exactly where the plot area is inside of the control is not available.

If you plot area size is fixed, you could use a picture control, set to transparent over the top of the plot area. Then use the same trick for the event returning co-ordinates. If you change the values on the scale however, the actual plot area can change in size too (since the renumbering on an auto-scale can cause the scale on the axis to move if the text increases or decreases in length)

By far the easiest route would be to buy the vision development module and use the image control which has the built in ROI capabilities (and editing of the ROI).

Hope that helps

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
Message 2 of 4
(6,008 Views)
Is there a way to send the data within the selected region into a new array?
0 Kudos
Message 3 of 4
(5,908 Views)
0 Kudos
Message 4 of 4
(5,901 Views)