Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

detection color

Hi, I am student and I am working on a project with scorbot. The robot has to segregate the balls due to the color. I want to make detection color using webcam which is conected to the workplace and configurate with the labview. To be honest it is my first contact with this program. Could somebody give me some information how can I start. Thanks in advance for answer. 

 
0 Kudos
Message 1 of 8
(5,569 Views)

Hello,

 

try converting the RGB (color) image to HSV (hue, saturation, value). Hue value is specific for each color, but saturation and value varies according to the environment conditions (lighting). After converting the color space, threshold the image using the appropriate values of hue, saturation and value. You can create a real-time (calibration) application and change these values interactively to determine the best parameters. Possibly, you can calibrate for different values in different illumination settings in needed (perhaps based on average image intensity). Or you can try histogram equalization (not on hue channel).

 

Other alternative can be color classification - this would require more effort though.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 2 of 8
(5,545 Views)

What is the back ground? Check direct pattern matching to begin with

0 Kudos
Message 3 of 8
(5,537 Views)

I suspect that the pattern matching will give problems due to the scale changes. Speaking of this - kulka, are there any scale changes of the object you are trying to detect?

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 4 of 8
(5,531 Views)

It definetly will. But to begin with op can try this

0 Kudos
Message 5 of 8
(5,527 Views)

Okey. Thanks a lot for helping, but like I said I am new in programming in LabView. It is really hard to me to understand what are writing about. I have made a program which compare the actually pictures from webcam and the orginal pictures which I made before. But it is not working properly. In the appendix is my program.  Could you look at this, and say what is wrong.

Message 6 of 8
(5,524 Views)

Hi kulka,

 

I agree with Klemen, converting RGB to HSV it could be a solution to your problem.

Since you are a beginner in LabVIEW, I would strongly suggest to use Vision Assistant as a tool where you can test different functions in  vision processing before implementing it in LabVIEW.


You should be able to find it in Start / All Programs / National Instruments / Vision / Vision Assistant 20xx.

Later, after you manage to find the right functions for processing, you can generate the code from Tools / Create LabVIEW VI.

 

Best regards,
IR

 

 

0 Kudos
Message 7 of 8
(5,509 Views)

Ok, I did it in another way, but I still have a problem. So, I decided to create program which is using color spectrum. So, the program takes view from the camera and shows color´s spectrum on the diagram. The problem is that, I dont know how I can distinguish diffrent colors. When on the diagram there will be the most , for example, of the yellow color, then, the diode LED will be lighetning-it is the problem. 

0 Kudos
Message 8 of 8
(5,485 Views)