LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with changing the Region of Interest (ROI) in Labview for FLIR grasshopper camera

I'm working with a FLIR camera in LabVIEW and having trouble changing the width and height of the area of interest. I was able to do this with NI-MAX, but for some reason, I can't seem to do it in LabVIEW.

I'd really appreciate it if you could help me out. Is there any way I can change the ROI (region of interest) in LabVIEW? Any advice you can provide would be much appreciated.

0 Kudos
Message 1 of 7
(856 Views)

Does the camera use IMAQdx?

If so, try the Advanced Functionality with Attributes.vi VI in the LabVIEW examples.  It will allow you to try changes to various attributes.

Some attributes cannot be changed while the camera is actively grabbing images, so stop grabbing before setting the ROI.

Make sure your new ROI is within the pixel range of the camera when changing image ROI.

Sometimes you need to change offset first, then width or height to avoid exceeding the allowed limits.

0 Kudos
Message 2 of 7
(834 Views)

>>Sometimes you need to change offset first, then width or height to avoid exceeding the allowed limits.

Or the reverse of this...

0 Kudos
Message 3 of 7
(830 Views)

Hi,

 

For setting the ROI with IMAQdx, check this:

https://forums.ni.com/t5/LabVIEW/Error-1074360302-When-Setting-the-OffsetX-in-IMAQdx-Property/m-p/41...

 

Regards,

Raphaël.

0 Kudos
Message 4 of 7
(815 Views)

Ouch.  I struggled with a FLIR Grasshopper for several months a few years ago.  Fortunately, other opportunities came along and I was able to "safely abandon" that project.  However, I don't recall that handling ROIs was especially difficult -- my problem was getting decent frame rates and Grabs ...

 

Bob Schor

0 Kudos
Message 5 of 7
(794 Views)

Thank you for your response. However, I am working with an older version of Lab view (2013) and the version of your code is not compatible with it. Would it be possible for you to provide me with the same code in Lab view 2013 so I can use it?

0 Kudos
Message 6 of 7
(775 Views)

Here it is.

 

From memory, I had to do it like this because:

1. Each parameter has min/max/increment constraints

2. Offsets and sizes are linked because (OffsetX + Width) and (OffsetY + Height) must not exceed Max Width and Max Height.

3. Not sure on this one, but maybe even the Offset increments could change depending on the Width/Height.

0 Kudos
Message 7 of 7
(766 Views)