Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting particle thickness and eliminating those particles with thickniss less than for a given value

Solved!
Go to solution

In my project after golden template comparison get I image with defects.

 

Thickness.jpg

 

For me are those defects (particles) relevant that has a thickness greater than a given value.

 

I tried some methodes, particle analyse, read some articles in this forum... But I can't find any real solution for my problem.

 

I need suggestions how to go about it.

Thanks in advance.

 

Devrim

 

0 Kudos
Message 1 of 12
(5,109 Views)
-Please go through this for different measurements that are possible
http://zone.ni.com/reference/en-XX/help/372916L-01/nivisionconcepts/particle_measurements/
-Can you please tell what didn't work for you?
-Did you go through the inbuilt examples on particle analysis and particle filter?If not please go through it first.
Thanks
uday
0 Kudos
Message 2 of 12
(5,101 Views)

Hello Uday,

Thank you for your answer. But...

Of course I tried all methodes and measurements in "Particle Measurements". My problem is a known problem and as far as I know there's no simple answer for my question. Defects (particles) that I get are not always linear. They have almost always rotations.

 

I read discussions in this forum. For example:

http://forums.ni.com/t5/Machine-Vision/Average-thickness-measurement/m-p/1012457

http://forums.ni.com/t5/Machine-Vision/measure-diameter-tickhness-from-binairy-picture/m-p/1126715

Circle detection and Danielsson distance map were other suggestions in these articles. II think, I have similar problem like in these articles.

 

For my understanding, methodes/measurements in "Particle Measurements" give no direct and simple information about thickness. Maybe one can derive from these Informations to find about thickness.

 

Uday, you asks: "-Can you please tell what didn't work for you?" If you were tried to get thickness value from my image for one of the particles, you would see what didn't work.

 

Devrim

0 Kudos
Message 3 of 12
(5,099 Views)

Thank you Kevin,

 

I'm trying to eliminate all particles with thickniss less than for a given value.That means, all defects (particles) with thickness less than given value are not important. They must be filtered. 

 

MaxThickness.jpg

 

 

 

Devrim.

0 Kudos
Message 5 of 12
(5,083 Views)
Solution
Accepted by desalando

There is a way to filter particles based on erosion.  If the particle still remains after N erosions, it is kept.  Otherwise, it is removed.  The function is IMAQ RemoveParticle.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 6 of 12
(5,069 Views)

Thank you very much, Bruce.  It really helped me out.

 

Devrim

0 Kudos
Message 7 of 12
(5,061 Views)

With Bruce's suggestion I was able to solve my problem. But first part of my question remains still unanswered. How can one find out max particle thicknes (dT) or at least average particle thickness?

 

 

 

MaxThickness.jpg

 

Devrim

0 Kudos
Message 8 of 12
(5,050 Views)
Solution
Accepted by desalando

Also easy.

 

Create a binary image of your particles.

 

Use IMAQ Label to create a mask from the binary image with a new image as the destination. (mask)

 

Use IMAQ Danielsson to create an image that maps the distance from the edge for each pixel. (source)

 

Use IMAQ Quantify with the two new images as source and mask.  The output will be an array of measurements, one for each particle.  If you look at the max value for each particle, doubling it should give you the max width of the particle, since the max value is distance to the center of the particle at the widest point.  The max value also tells you how many erosions it would take to remove the particle.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 9 of 12
(5,044 Views)

Thank you, Bruce. Your suggestions helped me a lot.

 

You write: " If you look at the max value for each particle, doubling it should give you the max width of the particle, since the max value is distance to the center of the particle at the widest point.  "

 

Not always. It's like these arrays:

 

(a) 1, 2, 3, 3, 2, 1 : Max Value is 3. Doubling it gives max width of the particle: 2 x 3 = 6, correct

but

(2) 1, 2, 3, 2, 1: Max value is also 3. But doubling it don't five correct witdh. Correct witdt is "5"

 

or simpler

 

(3) 1,1 : max value is 1, width is 2

ok, but

(4) 1 : max value is 1 but width is 1

 

MaxValue_3.jpgMaxValue_2.jpg

 

Devrim

0 Kudos
Message 10 of 12
(5,029 Views)