Asked — Edited
Resolved Resolved by DJ Sures!

Multi Color Tracking Question

An implementation question. When tracking (multicolor) with two objects matching different colors, JD appears to always return first color defined in the CameraObjectColor variable. The other color object variables either have the first color in the detection group or the last color defined. For example: with a red ball only, it sees a red ball. With a green ball, it sees a green ball. However when they are both in the field, it only responds red ball. Red was the first custom color defined. COC and COC_1 both hold red while COC_2 and COC_3 hold green regardless of what color (red or green) is before the camera. Is there any way to differentiate between the two when they are in the same field?


ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

PRO
Synthiam
#1  

From what i "think" you're asking, No - disable one of the colors. As a human, even your eyes can't move toward two (2) different objects at once.

You can either manually disable a color by using the mouse and clicking on the checkbox next to it in the list.

-or-

You can use the ControlCommand() to programatically specify what color to track

Also, it's good to understand what you are attempting to accomplish - i.e. what is the goal. A question without motive doesn't have context for assistance. This means, the question is missing the goal which also makes it difficult to assume an answer. I can only provide an answer based on assumption. The answer you receive is only as good as the question you ask :D

Alternatively, you can check each variable for the color. This is with programming. I would first recommend how to program by checking out The Robot Program tutorials. We have put a lot of effort to create fantastic tutorials that help you learn how to program. EZ-Robot is dedicated to helping people learn logical programming and planning. Check out the robot program to learn more about programming.

Walk before you run :)

#2  

Thanks, I am working on a demo for a talk I will be giving. First stage is to have JD scan a region to find a specific color. At the moment I am limiting it to red and green. As he looks about I want him to announce when he finds the red object, green object, etc. Step 2 is to find a specific object. So if I say find the red ball, he scans the area around him and announces whether or not he sees the red ball. The software works for either of three cases: red ball present, red ball absent, red and green ball together. When asked to find the green ball the third case fails as red is contained in the CameraObjectColor variable. For demo purposes I am doing this in blockly, but I see no way to disable a particular color in blockly. Am I missing something?

As for checking for each variable for the color, I tried that, but all the COC variables either show the last defined color (green) or red for COC and COC1 when the red ball is present. Again if those are not the variables you mean then which are they?

As far as walking before I run, I am a "newbie" only as far as JD is concerned. I have built over half a dozen robots before JD, and my previous project was to write a servotor compatible system to power a hexy with an arduino mega rather than their compatible board. 1800 lines of C and counting. I chose JD because it would be easier to show the logic to my class using blockly, but I find the language limiting. This is why all the questions.:) Otherwise, do I have to go to the scripting language?