From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect V-Notches

Solved!
Go to solution

Hello everyone,

 

I am trying to detect V-Notches on an selected part/ROI. To do this, i use pattern matching.

 

First i defined a V-Notch template. Then use i with this template on selected part/ROI pattern matching.

 

I have two problems there:

- V-Notch sizes are not always same. For example, as you can see on image "Detect_V-Notch_01b.jpg", v-notches are smaller than v-notches on "Detect_V-Notch_02b.jpg".

- Sometimes find pattern matching slits as v-notch (as you can see on image "Detect_V-Notch_01b.jpg"

 

Have anyone a suggestion, how i can find all the v-notches and just the v-notches (not slits)?

 

 

0 Kudos
Message 1 of 5
(5,399 Views)

Try to use the contour analysis tool with seperate regions for the staight sides. Use the template for defining a reference coordinate system for the search regions.

 

An alternative similar approatch could be to implement an IPAN99 algorithm. Have been using this before the coutour analysis toolkit was implemented in labVIEW.

 

Best regards

0 Kudos
Message 2 of 5
(5,391 Views)

Hello Rlar- thank you for your answer. I have already considered to use contour analysis. But i don't think it really work for my problem or i don't know how. As i wrote before i don't want to find slits. If i use contour analysis i find slits, too.

0 Kudos
Message 3 of 5
(5,388 Views)
Solution
Accepted by topic author desalando

First of all, you can enhance their tighter angle with a Laplacian filter:

01.png

 

It's much easier to then analyse the contour.

I added some filter to close the contour and remove small particles, and then looked at the outer line with the contour / curvature analysis tool:

02.PNG

 

First of all, I analyze with a fairly small radius, and use the Peak and Valley Detector http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_peak-valley_detector/ to find the "bumps". 

 

03.PNG

 

This works well to find the notches and ignore the slits, but it give 2 false positives in one picture. To identify them, you have to look at a bigger curvature

 

04.png

Now using the Peak and Valley Tool is not enough - you need to set a minimiu threshold for this, for example 0.1

 

05.png

 

That's it.

Put all of that together, then take care of this problem with the curvature tool : http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Vision-Curvature-for-quot-closed-quot-contours/idi-p/2...

and you are done.

 

Message 4 of 5
(5,313 Views)

Hello b.ploetzeneder,

Thank you for your answer, it really helped. But i have a question.
You wrote: "I added some filter to close the contour and remove small particles..."

Which filter is that? I have tried some filters, too.
But i couldn't reach the same results (close the counter & remove small particles) and outerline like you have.

0 Kudos
Message 5 of 5
(5,305 Views)