03-28-2014 03:47 PM
Is there a way to set the ROI dimensions dynamically (ie, using the calculator or Set Variable step) in VBAI without any additional software license and/or scripting?
Using an integer variable calculated in an earlier step, I'd like to change the width of the ROI to match that integer value before the ROI is used in a latter step for another inspection.
Solved! Go to Solution.
03-28-2014 05:09 PM
Check out the ROI step (at the bottom of the second palette). This is exactly what this step is meant for and then you can use the produced ROI in any sunsequent step.
03-30-2014 03:44 PM
Thanks for the reply....
I haven't been able to figure out a way to feed variables into that ROI. Once I define it, I haven't been able to figure out how to change the shape during runtime based on variables.
For example... if I create a Circle ROI, and then I want to use a calculated X variable and calculated Y variable from earlier to determine the Width (x) and Height (y) of the ROI before I use that ROI in the next step for a different inspection tool.
03-31-2014 10:05 AM
Hi bjk10,
Once you've created a Create Region of Interest step, go to the coordinates tab. You'll see that you can enter a numerical value for the different measurements, but if you use the drop-down menu you can also select measurements from previous steps. For example, I had a Find Edges step before creating my ROI, so I have an option "Find Edges 1 - Find Edge[1].X Position (Pixel)". If you want to base your ROI on previous measurements, just make sure you set up those steps first so you have these options to select from.
I hope this helps!
03-31-2014 10:22 AM
Emily-C,
I see it now. Thanks.