Asked — Edited

Multi Color Tracking Still Can'T Get It Right

I still can't get the mult color tracking to work like in the tutorial. I can get it to recognise the colors no problem but it is like it is not resetting the variable, in this case the last color it saw at the end of the script. If I turn off multi color tracking let things reset and then turn it back on it sees the next color. That is why I do not think the script is ending properly, either that or it is not going to the tracking end script!

Here is the script:

ControlCommand("Auto Position", AutoPositionAction, "Point")

SayezbWait ("I see a " + $CameraObjectColor)

Stop()

and here is the end script which I have not touched:

ControlCommand("PointAndTrack", ScriptStop)

Stop()

I notice that on the cam config, scripts, tracking tab that the tracking start and tracking end are both "Multiline Script"

my number of frames before execute is: 5

I am putting a short video on youtube to show you the behavior, sorry about the poor quality I was juggling the camera, the mouse and the flashcards at the same time.

So how do I fix this?


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#1  

It is detecting the second color. You can see this on the screen by having the square around the object it detects with that color.

It looks like the issue is in your script that is trying to say what it detects. Please post your script so that we can review it and give you an answer on how to solve the issue.

Is this the entire script?


ControlCommand("Auto Position", AutoPositionAction, "Point")

SayezbWait ("I see a " + $CameraObjectColor)

Stop()

and here is the end script which I have not touched:

ControlCommand("PointAndTrack", ScriptStop)

Stop()

PRO
Synthiam
#2  

This is a duplicate thread from the existing user. The original thread can be found here: https://synthiam.com/Community/Questions/8013

This thread is closed. Please use the original thread.

#3  

I want to work through this with you without giving you the answer directly. It will help you learn a little bit about some very powerful features of the scripting engine.

One more question for you though. What is firing the script?