random image random image random image random image random image random image

Now that we can move the robot, we need to be able to see where we are going. To give our robot eyes within flash, I first tried a series of images using the still image command from the Rovio api (/Jpeg/CamImg[value].jpg). This produced stuttering, unreliable quality video. I needed to get at the video stream that Rovio broadcasts, the RTSP stream (Rtsp://xxx.xxx.xxx.xxx/webcam). To get the video stream into flash it needed to be transcoded to flv. The go-between for the video was a Red 5 server which took in the live Rovio RTSP stream and output a live flv stream. Catching the flv stream was a netstream connected to a video object. This provided a much cleaner, smoother image for driving the robot.

Not only did the robot need eyes, he also needed to be able to recognize what he was looking at. The objective of the interactive was to have young children track down specific objects on a surface. To give them a prompt and to make the video of the surface a bit more interesting, a target was to be overlayed on the video pointing to where the object was. This meant that the Rovio would need to distinguish between the unique objects on the driving surface. So what set the objects apart from each other? More in the next post.

Recipe for robot eyes:

Wowwee Rovio
Red 5 video server
Flash netstream/video objects

Download Flash Builder 4 Project – Using consecutive jpg images, choppy

Download Flash Builder 4 Project – Using red 5 connection

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • NewsVine
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis
  • Diigo
  • FriendFeed
  • Identi.ca
  • Posterous
  • Suggest to Techmeme via Twitter
  • Twitter

One Response to “Making the most of your toy robot (Part 2 of 4) – Processing the video stream in Flash”

  1. Making the most of your toy robot | Electric Pineapple

    [...] Processing the video stream in Flash [...]

Leave a Reply

Powered by WordPress. Theme developed with WordPress Theme Generator. Header images provided by idee.
Copyright © Electric Pineapple. All rights reserved.