Dynamic ROI Adjustment and Pixel Counter for Copper Plate Inspection

From Vision Expert:

There is not a simple way to make the ROI fit the plate when you have tilt and skew, as far as I know. If it only had been rotation then alignment would have been your friend, but not in this case. The only solution I can think of requires 2 pictures and a bunch of math.

  1. First Image, here you by using probing (two or more for robustnes) determines the plate position using the min/max x/y resultats of the BLOBs

  1. Then you calculate the ROI lines and intersection points with math. There are functions to do so in the BRDK vision libs, as far as I remember.

  1. Then you though viAccess changes the ROI to fit. This can be done with the viAccessSetVfExecutionRoi either the Region (each px in the ROI) or the REGION_RLE (each “line” in ROI, in your example this would be the best) and the I would use a slight offset from the calculated edge to minimize the change of including the edge. And you also need take the motion between pictures into account when calculating the ROI position but that should simply be an offset in x or y direction. and you know the speed (I assume) and the image nettime so it simple to calculate.

  1. In the second image with the custom ROI you now get your result ![:slightly_smiling_face:]