video API examples

Following listing presents how to access video stream from robot structure and how robot structure functions utilize modules.

//simple example of face tracking,//starts infinite loop which updates video stream
faceTracking: loop
    if ( {
      var pos =;//all necessary information extracted from the video are provided by robot structure
//we can easily use other video features, e.g. movement tracking
tag2:whenever ( movement was detected
   echo("Movement detected, X: "+ + ", Y: " +;//print coordinates of center of area where movement was detected"camera");//takes the photo from camera"path/fileName.jpg");//and saves it to given location and name



EMYS and FLASH are Open Source and distributed according to the GPL v2.0 © Rev. 0.9.2, 23.11.2017

FLASH Documentation