Asked — Edited
Resolved Resolved by Rich!

Ez-B Color Tracking Question

Good Afternoon,

I am trying to get a better understanding of how the tracking works. The debug button within the camera control, allows you to see what is going on with the camera. I have not been able to see anyway to use that data in the EZ-Script. I will go ahead a apologize if it is there and I have not been able to see it.

Thanks, WayneA confused


ARC Pro

Upgrade to ARC Pro

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

#1  

If I understand correctly, your wondering if there's a way to use the debug data in a script?

Well, from my understanding, the debug is just for trouble shooting. If you want to do something like have the robot beep when something is detected, you need to use the variables created by the camera control. You see these by clicking the gear icon on the camera, and click the scripts tab, then variables. How to make a beep script:


If($cameraistracking = 1)
say("beep")

ElseIF($cameraistracking = 0)
say("I cannot see anything")
EndIF

#2  

In the camera control config, you can have a scrip run when tracking is started and when tracking is ended... you have all the below available to use in any script including the reserved variables at the bottom...... Camera Device


CameraServoTrackEnable
CameraServoTrackDisable
CameraServoTrackToggle
CameraMovementTrackEnable
CameraMovementTrackDisable
CameraMovementTrackToggle
CameraServoTrackRelativeEnable
CameraServoTrackRelativeDisable
CameraServoTrackRelativeToggle
CameraSnapshot
CameraTweet #(Requires additional parameter)
CameraViewRealtime
CameraViewProcesssed
CameraResetQRCode

	#Camera Recording
CameraRecordToggle
CameraRecordStart
CameraRecordStop
CameraRecordPauseOn
CameraRecordPauseOff
CameraRecordPauseToggle

	#Camera Device Tracking Modes
CameraView
CameraColorTracking
CameraColorTrackingEnable
CameraColorTrackingDisable
CameraMotionTracking
CameraMotionTrackingEnable
CameraMotionTrackingDisable
CameraFaceTracking
CameraFaceTrackingEnable
CameraFaceTrackingDisable
CameraGlyphTracking
CameraGlyphTrackingEnable
CameraGlyphTrackingDisable
CameraQRCodeTracking
CameraQRCodeTrackingEnable
CameraQRCodeTrackingDisable
CameraCustomTracking
CameraCustomTrackingEnable
CameraCustomTrackingDisable
CameraMultiColorTracking
CameraMultiColorTrackingEnable
CameraMultiColorTrackingDisable
CameraAutoTracking

                #Reserved variables to use in scrips...
$CameraIsTracking
$CameraObjectCenterX
$CameraObjectCenterY
$CameraObjectWidth
$CameraObjectHeight
$CameraQRCode 
$CameraObjectColor
$CameraObjectName
$CameraTrackingType
$CameraHorizontalQuadrant
$CameraVerticalQuadrant

#3  

Thanks Technopro for the response!

With in the debug screen (it goes really fast!) There is a statement "16 Color and then i see (187,89) What are those numbers for? Can I use that in a script to maybe better help my robot stay where I want him to go? For me at least, it is difficult to keep the color tracking on track!

#4  

Woah Rich!

That's a lot of info!

Where are the arguments for the aforementioned commands? Do these values return a one or a zero?

Thanks Again!

#5  

Go into the camera control camera config... At the top you'll see tabs( Settings, Scripts, Augmented reality...etc).... Cycle through the tabs to see what's there... Under scripts is where you can see what you can do with the camera info...

#6  

Some will return "true or false" or 1 or 0... Others like $CameraObjectName will return the name (of a previously trained object)....

#7  

The available Cheat Sheet are in any script just open a script... at the top right side of your script... select "Control Detail" tab... If you have a Camera control in your project all the camera controls will be listed there...

#8  

Precisely what Richard said. Some return 1's and zero's, some true and false.

If you want to know exactly what they do, use the variable watcher control, and run the camera control. It will show all the variables and what they're outputting.

If you want to keep your robot tracking the right object, try using multiple tracking types.(E.G. object tracking and color tracking, etc.)

Not sure what the numbers are. Possibly coordinates or color code?

United Kingdom
#9  

The easiest way is to add the variable watcher and see what the variables are for the camera and the type of data they hold.

User-inserted image

Or click the variables tab to the right of the EZ-Script dialogue for a list of all variables and their values.

User-inserted image

#10  

Thank You for the help!