05-26-2014 04:24 AM
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.
05-27-2014 02:21 AM - edited 05-27-2014 02:26 AM
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
05-27-2014 03:05 AM
What is the back ground? Check direct pattern matching to begin with
05-27-2014 03:26 AM
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
05-27-2014 03:40 AM
It definetly will. But to begin with op can try this
05-27-2014 03:47 AM
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.
05-27-2014 06:44 AM
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
05-28-2014 05:08 AM
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.