Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.
Get Started

Australia
Asked
Resolved Resolved by Dunning-Kruger!

Camera Object Name

How do I reset or clear the last object detected by the camera?
The $CameraObjectName variable stays set to the last object detected. This means even when no object is detected or recognised, my script executes incorrectly - instead of saying object not recognised..


Related Hardware EZ-Robot EZ-B v4
AI Support Bot
Related Content
Synthiam
#1  
I believe it is just a global variable so maybe you can just "zero" it out after detection?...

Code:

$object = $CameraObjectName 


$CameraObjectName = ""
Synthiam
#2  
Don’t reset the variable. Instead check if there’s a detection. Then check the tracking type that’s detected, if there’s more than one tracking type.
Synthiam
#3  
Such as...

User-inserted image



User-inserted image


Code:


if (CameraIsTracking == true && CameraTrackingType == "Object") {

  print(getVar("$CameraObjectName"));
}
Australia
#4  
I didn't realise one could change these global variables within script. Setting their value to null after tracking ends solved my problem. Thanks.