Example Code

How to Fill a Region of Interest (ROI) with Vision Acquisition Software

Code and Documents

Attachment

This VI demonstrates how the user can programmatically fill their ROI with a rectangular overlay. This VI requires Vision Acquisition Software. The image buffer created is 400x400 pixels, and is then filled with a pixel value of 100. This is just to see a gray background. Then, using an event structure, the ROI cooridnates are transformed into a rectangular overlay with the bundle function. The boolean "fill?" determines whether or not to fill the ROI.

FillROI.jpg

Chris Van Horn
Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
PietH
Member
Member
on

To fill a rectangular ROI is easy, but how to fill a polygon or closed freehand ROI? Any suggestions?

Best regards. Piet

Contributors