Asked — Edited

Camera Unreliable ? Using Blockly

I am trying to get jd to recognize different object by using multicolor tracking. I have defined 3 colors (red, green and yellow) for multicolor tracking. Using blockly, I have an if statement "if cameraobjectcolor_1 = "red" . If is sees red it says I see red. etc The problem is that it is unreliable. I can see the tracking box around the red object, but half the time it says it can't see it. Also I notice that by default it seems that the cameraobjectcolor_1 variable holds the last defined color. So that if I test for yellow, it says it sees yellow when looking at a blank piece of paper. It also seems to retain the last color it found. E.g. Red object in view and tracking box is around it . It says: I do not see the red object, but is if ask it to look again with the red object now gone, it says: I see the red object. Am I not clearing something? I have put in delays to no effect. I could use some ideas. WM P.S. I forgot to mention that I am doing this as a blocky program and not a script added to the camera tracking. It is the first stage of a more complex project


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

PRO
Synthiam
#1  

Please follow the tutorials that we have spent a significant amount of time creating for you:) You can find them in the Learn section for The Robot Program. There's a great tutorial on how to use Multi Color. The variable that you are using is the incorrect one. Also, training the object for correct color is important - and that's covered in the fantastic tutorials.

  1. Visit www.ez-robot.com

  2. Click on LEARN from the top menu of the website

  3. Select your product for activites from the list

  4. Follow tutorial activities

  5. Have fun!

#2  

Thanks for your reply. I have looked at the tutorials you mentioned, but they are tracking objects. I am trying to track colors. I have set the appropriate multicolor colors and have tried all the cameraobject color variables. Are you saying I must train it for a specific object? I was hoping to tell it to find red objects and have it scan for the color. Is this not possible? It seems to be possible from the tutorials. My problem is that I can't get it to work reliably. Any suggestions? Again, the tracking rectangle is visible when it sometimes claims not to see an object and at other times it "see" the object when faced with a blank wall. Going the object route would severely limit the program. WM P.S. I went through all the tutorials before starting the project. Again thanks

#3  

I trimmed up the colors and it is working more reliably.