Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Color Segmentation, Object Seperation

Hello there. I need to segment colors in an image and find the centers of all seperate objects in the image(for example image, paper.jpg). My block diagram and front panel output screenshoots are attached below. I've used Labview's Color Classification Training Tool to create color classes. Options below.

 

.

Spoiler
class.jpg

 

 

Here are my questions:

1)How can I improve my segmentation success rate? As you see(front.jpg) there are some empty or unconnected points in objects.

 

2)When I try to segment only Blue color one segment and make others(green, pink, yellow objects and background) another segment(at total two segments, Blue and others) I only train blue color at Color Classification Training Tool. But when I run the VI, as you see(front.jpg) my output is only a Black Screen. How can I solve that?

 

3)How can I seperate all of those objects. I want make all blue crosses seperate(crosses are my objects, other lines, small shapes, circles etc. are just for test), all pink crosses seperate etc. So at the end I need to have got 16 seperate objects(4 blue cross, 4 pink cross etc.)

 

4)And my final question. How can I find all of those seperate object's(crosses) centers? In my project I need to detect how much center of two blue crosses' centers move away from each other. (I've drawn 16 crosses and 4 different colors but it's just for test, at my project there are only 2, 3 or may be 4 crosses and they are all same color, 

Download All
0 Kudos
Message 1 of 11
(6,173 Views)

I don't have any suggestions for you right off, but I'll try playing around with images you attached. Could you please upload the classier file(s) you generated?

 

-Mike

0 Kudos
Message 2 of 11
(6,130 Views)

@Poolean wrote:

I don't have any suggestions for you right off, but I'll try playing around with images you attached. Could you please upload the classier file(s) you generated?

 

-Mike


Hello Mike. Classifier files attached.

 

https://drive.google.com/file/d/0B_y4KU_PL5Z6LXJWWnJiUlcyV1k/edit?usp=sharing

0 Kudos
Message 3 of 11
(6,125 Views)

I'm still seeing the completely black image result. I tried replicating your block diagram, working off of the Color Segmentation shipping example, and creating a classifier from the paper.jpg image you uploaded.

 

Have you been able to make any progress?

 

-Mike

0 Kudos
Message 4 of 11
(6,069 Views)

@Poolean wrote:

I'm still seeing the completely black image result. I tried replicating your block diagram, working off of the Color Segmentation shipping example, and creating a classifier from the paper.jpg image you uploaded.

 

Have you been able to make any progress?

 

-Mike


 

I could not make any progress sir. I don't know why.

0 Kudos
Message 5 of 11
(6,052 Views)

Try taking another picture of the image of the image with more consistent lighting. I'm only able to get consistent results with the pink crosses, which seem to have the best even lighting.

 

With respect to your other questions:

 

3. What do you mean by separate the crosses into different objects? Could you please expand on this?

 

4. After performing the segmentation, you could try using the IMAQ Particle Analysis Report VI, which will give you the center of mass of all particles in the image. You have to perform some filtering to make sure that the particles you're using are the crosses and not other unimportant objects like the ones you drew on your test paper.

 

-Mike

0 Kudos
Message 6 of 11
(6,046 Views)

@Poolean wrote:

Try taking another picture of the image of the image with more consistent lighting. I'm only able to get consistent results with the pink crosses, which seem to have the best even lighting.

 

With respect to your other questions:

 

3. What do you mean by separate the crosses into different objects? Could you please expand on this?

 

4. After performing the segmentation, you could try using the IMAQ Particle Analysis Report VI, which will give you the center of mass of all particles in the image. You have to perform some filtering to make sure that the particles you're using are the crosses and not other unimportant objects like the ones you drew on your test paper.

 

-Mike


 

I mean I want to treat them as independent objects. Example for pink crosses, when we segmentated them they are all same segment but I want to use them seperately.

0 Kudos
Message 7 of 11
(6,037 Views)

Ok. I think I understand. But, if you're currently able to segment the oringal image and display all of the colors, then, you should be able to create a work-around to the issue of trying to segment based on just one color.

 

You could do this by using color thresholding, or by extracting color planes from the image after the segmentation is performed.

 

-Mike

0 Kudos
Message 8 of 11
(6,020 Views)

Did you try thresholding as suggested? Do you want to extract individual crosses?

0 Kudos
Message 9 of 11
(6,010 Views)

hI ALL, i am new to labview. I need to detect circle, rectangle and triangle and count them. I have developed for rectangle and circle by using IMAQ detect shapes. How to do for triangle?? Please suggest me.

0 Kudos
Message 10 of 11
(5,893 Views)