Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure Geometry, what if using a bad point?

VBAI 2.6.1:  I am trying to use Measure Geometry and am selecting a <large> number of points found in previous steps.  However, sometimes the points cannot be found, which is fine, but then I don't want to include them in the Measure Geometry step - of possibly have some control over what they are. They seem to have a random value in them by the time I get to the Measure Geometry step.  How can I include only 'good' points?
Thanks
 
0 Kudos
Message 1 of 4
(3,630 Views)
Hello kdalton,

What exactly is a 'bad' point?  Is it a point that is used in the Geometry function that was not found?  How are you determining that the points have random values by the time your inspection gets to the Geometry step?

If I use the Find Edges function and I look for point 8 in the Geometry function, but no point 8 is found in one of the images, the Geometry function will fail with the message "Point not available".

The best thing to do in this case is to make sure all your images will consistently have a point 8 in the correct location on the image with techniques such as proper lighting and further image processing.

Allen H.
0 Kudos
Message 2 of 4
(3,613 Views)

What you described would fall into the category of 'bad' point.  Since the who point of this is an inspection (VB AI), I cannot always ensure all objects will be where they are supposed to be - hence the point of inspecting it.  But I can't lose the entire inspection information because one object is not where it should be...

When I started getting really odd results when subsequently using a 'bad' point (point not found, etc), I examined the point using the Calc step.  I  thought I could add some logic to check for a zero or something but it the x/y values have nothing to do with the search region, etc.  I have to do this after locating over 40 objects so I was hoping to keep it simple.  My next best option, which I haven't tried to see if it can work would be to add a Calc step and check on the status of the object location steps and create new variables to either contain the current values upon success or other values upon failure.

And no, I don't I have LabView.

0 Kudos
Message 3 of 4
(3,612 Views)

Hello kdalton,

If the object is not where its supposed to be in an inspection, then the inspection should indeed fail, and your points will likely be incorrect (point 4 in the failed inspection was actually supposed to be point 😎 or missing (inspection only finds 9 points so point 10 does not exist).  This could be causing the random values you are seeing.  If you are defining points in your inspection and doing calculations based on these points, the inspection has to assume that those points will always be there.

 

In case these points are not there, you can still log the measurement values and images of both passed and failed inspections by clicking on Tools>>Configure Inputs/Outputs.  Go to the Inspection Output section.  Select Data Logging and click Setup to configure logging of your measurement values.  Select Image Logging and click Setup to configure logging of your images (select the Merge Overlay option to include the inspection overlays on your logged images).  This way you can retain information of both your passed and failed inspections.  You can then look back at your failed inspections and figure out why they failed.

 

One way you can try to make sure that the points will be detected is using the Coordinate System function to find an object in the inspection and then use the location of that object to determine the locations of the rest of the objects.  To see how this is done, open the example called “Tutorial 2 – Coordinate System, Presence/Absence”.

You could also use Calculator steps to make calculations based on points, measurements, and the results of previous Calculator steps.

 

The main idea is that it is best to make sure your images are in good condition and that you configure inspection in a way that it will consistently detect all your points.  In the case that an inspection still fails, you have the ability to log the measurement, calculation, and image information so you can later investigate the cause of the failure.

Allen H.

0 Kudos
Message 4 of 4
(3,593 Views)