Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

PASS/FAIL

hi ;

I have some problems about integrating pass/fail decision to the processed image. How can I put pass/fail function in the attached program? for example, if you run this program, you will get some colored areas on the fig. If some colored areas appear on the fig, the program must give "fail" decision, or if there isn't any defect on the fig (no colored area), it must give "pass" decision. how can I place this command in the program?

thank you...

 

Download All
0 Kudos
Message 1 of 2
(3,018 Views)

Hey Adanali-

 

One way that you could accomplish this next step is to add a "Quantify" step (located at Processing Functions»Grayscale»Quantify) after your thresholding step. You can select your desired region and (among other things) it finds mean pixel value in the region you define. Since the result of the thresholding step results in a image of 1's and 0's (0 being the troubled region, and 1 being the region that is filtered out), your mean will be less than 1 if you have any troubled regions. You can then use this step to output the mean value when you export your script to your code. You can then check this average against an acceptable limit and flag a "FAIL" if it does not meet your limits.

 

Let us know if this helps

 

Ben

Applications Engineering

National Instruments

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 2 of 2
(2,982 Views)