Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

separation of particles

I need to be able to separate objects in a U8 image.

 

I have a program that finds the center of ion hits (white spots) on an image. Sometimes two ions hit very close to each other. This is a problem since they will only be counted as one ion hit - located at the center of mass of the combined hit.

 

How can I separate them into two separate objects?

 

The program works as follows:

1. Threshold to get rid of most of the noise (set pixels with value below 20 to 0).

2. Particle filter 2 removes particles of size less than 9 pixels (which usually is noise).

3. Imaq label labels each particle.

4. The labeled particles are used as a mask for imaq centroid.

 

I somehow need to separate the mask into two parts, if there is a double ion hit.

 

A sample image is attached, with clear indications of double hits in two places. (de032.png)

 

Also the program is attached. (the 8 bit binary file reader should not be needed).

Message Edited by svif on 02-08-2006 08:56 AM

Download All
0 Kudos
Message 1 of 10
(7,503 Views)
Apply a Smoothing-Gaussian filter (3x3) to the original image, followed by a Edge detection-Laplacian (7x7), then threshold at 127, and remove the small particles.

This gives the attached image.

Message Edité par chilly charly le 02-09-2006 08:49 PM

Chilly Charly    (aka CC)
0 Kudos
Message 2 of 10
(7,474 Views)

Thanks for your reply.

It seems like a very nice method, however, I could not find the vi's you mentioned. Are they a part of IMAQ Vision?

 

The gauss smoothing seems to be incorporated in CannyEdgeDetection, I will try and see how that vi works.

 

/Simon

0 Kudos
Message 3 of 10
(7,453 Views)

Any smoothing filter will do. The effect is to damp the image noise, while adding some blur. Use the IMAQ convolute function (in the vision > image processing > filters subpalette) with a 3x3 kernel.
The kernel can be generated using the IMAQ GetKernel function, using Gaussian (4), 3, 4, as inputs for Kernel family, kernel size and kernel number respectively.

The Laplacian filter is a edge detector. That's why it is most often used after noise removal. Use again IMAQ convolute, with Laplacian (2), 7 and 0 as inputs for the GetKernel function.

I have attached the corresponding vi, significantly simpler than yours. Savec as Vision 8.0, not sure you have it yet...

Message Edité par chilly charly le 02-11-2006 04:03 AM

Chilly Charly    (aka CC)
Message 4 of 10
(7,416 Views)

Any smoothing filter will do. The effect is to damp the image noise, while adding some blur. Use the IMAQ convolute function with a 3x3 kernel.
The kernel can be generated using the IMAQ GetKernel function, using Gaussian, 3, 4, as inputs for Kernel

And the tab bug striked again ! Molly, is there something planned to avoid this ?

Message Edité par chilly charly le 02-11-2006 03:54 AM

Chilly Charly    (aka CC)
0 Kudos
Message 5 of 10
(7,411 Views)

Any smoothing filter will do. The effect is to damp the image noise, while adding some blur. Use the IMAQ convolute function with a 3x3 kernel.
The kernel can be generated using the IMAQ GetKernel function, using Gaussian, 3, 4, as inputs for Kernel

And the tab bug striked again ! Molly, is there something planned to avoid this ?

Message Edité par chilly charly le 02-11-2006 03:52 AM

Chilly Charly    (aka CC)
0 Kudos
Message 6 of 10
(7,411 Views)

Any smoothing filter will do. The effect is to damp the image noise, while adding some blur. Use the IMAQ convolute function with a 3x3 kernel.
The kernel can be generated using the IMAQ GetKernel function, using Gaussian, 3, 4, as inputs for Kernel

And the tab bug striked again ! Molly, is there something planned to avoid this ?

Message Edité par chilly charly le 02-11-2006 03:52 AM

Chilly Charly    (aka CC)
0 Kudos
Message 7 of 10
(7,410 Views)

Any smoothing filter will do. The effect is to damp the image noise, while adding some blur. Use the IMAQ convolute function with a 3x3 kernel.
The kernel can be generated using the IMAQ GetKernel function, using Gaussian, 3, 4, as inputs for Kernel

And the tab bug striked again ! Molly, is there something planned to avoid this ?

Message Edité par chilly charly le 02-11-2006 03:53 AM

Chilly Charly    (aka CC)
0 Kudos
Message 8 of 10
(7,411 Views)

I must say that your vi is extremely effective, almost too effective since it detects even very weak signals.

In order to understand the processes in the program I tried to add indicators throughout the process, so that I could see the effect of each step in the routine. However im dooing something wrong, when I try to add indicators. Can anyone tell me how to do it right?

0 Kudos
Message 9 of 10
(7,392 Views)

Your vi is alright... except that you forgot :

1 - to wire the error in/out of the intermediate display operations. Due to the data flow woperationnal mode of LabVIEW, plus the way images are managed in LV, the additionnal pictures were displaying only the end picture. Chaining the operations ensures that the intermediate displays are built before the image is further processed;

2- to change the display mode of the intermediate pictures : rigth click on the display area ands select palette > binary

Chilly Charly    (aka CC)
Message 10 of 10
(7,353 Views)