View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

DART Xtra Documentation

Here are the current calls into the DART Xtra. While we don't generally expect DART users to call the xtra functions themselves (since we handle much of this in the DART behaviors) they are provided here for those of you that need to call them.

THIS IS OUT OF DATE. NEEDS TO BE UPDATED.


VRPN Xtra Documentation

The commands that deal with cameras, video and marker tracking within video. Currently, only one camera can be open at a time.
  • " videoInit string"
    • initialize the video subsystem, but don't open the camera yet.
    • The first parameter is the path the camera calibration data file.
  • " videoOpen string"
    • Open the camera, start capturing.
    • The parameter is the camera configuration string.
  • " videoReplaySize int, int, int"
    • Set the size of the video that will be fed in when replaying.
    • Unclear if this will be needed, since we can replay without the xtra, but this will be needed to support loading images into texture memory, or running the ARToolkit on them.
    • The parameters are the width, height and depth of the images.
  • " videoFOV"
    • get the field of view of the camera.
    • -1.0 on error (camera not open)
  • " videoWidth"
    • get the width (in pixels) of the video stream.
    • -1 on error (camera not open)
  • " videoHeight"
    • get the height(in pixels) of the video stream.
    • -1 on error (camera not open)
  • " videoDepth"
    • get the depth (in bits) of the video stream.
    • -1 on error (camera not open)
  • " videoClose"
    • close the video subsystem.
  • " videoMarkerTrackingInit string, int, string, int"
    • Initialize marker tracking on the video stream.
    • the first parameter is the path to the fiducial panel definition file.
    • the second parameter is the ARToolkit threshold value.
    • the third parameter is the lingo callback for marker poses.
      • For each marker panel found, a message will be sent of the form
        • int panelId, int timestamp, [r0c0, r0c1, r0c2, r0c3, r1c0, r1c1, r1c2, r1c3, r2c0, r2c1, r2c2, r2c3] poseMatrix
    • The fourth parameter is a boolean, saying if OpenCV should be used.
    • returns the number of fiducial panels (-1 on error)
  • " videoSetupVideoToTexture"
    • Find the texture to be used for background video. Assumes that the first large texture it finds is the correct one.
    • Returns the integer texture id.
  • " videoProcessVideoToTexture int, int"
    • DEPRACATED. USE THE SET OF ROUTINES BELOW.
    • Read a frame from the camera, put it in the background, and optionally run the marker tracker on it.
    • The first parameter is the texture id to put the video in.
    • The second parameter is a boolean, saying if marker tracking should be used.
  • " videoGetNextFrame"
    • Read the next frame from the camera, saving it in the xtra.
    • Return 0 if there was no video, and the timestamp if there was a video frame.
  • " videoFrameToTexture int"
    • Copy the currently saved video frame to the provided texture
  • " videoTrackMarkers"
    • Run marker tracking on the saved video frame.
  • " videoFrameToImage object"
    • Copy the saved video frame to the provided image object
  • " videoFrameFromImage object"
    • Copy the frame from the image object to become the saved video frame.
    • This only works if the camera has not been openned. The first time this is called, it creates a video frame buffer the size of the passed in image. After that, it checks to make sure each passed in frame is of the same size.
  • " videoReleaseFrame"
    • Release the saved video frame. Must be called before videoGetNextFrame is called again after a frame has been saved.

Link to this Page

  • DART Documentation last edited on 12 July 2004 at 12:55 pm by dhcp46.mobile.cc.gt.atl.ga.us