DOC PREVIEW
MIT 6 111 - Realtime Light-Saber Generator

This preview shows page 1-2-22-23 out of 23 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Realtime Light-Saber GeneratorBy Yuhsin Chen, Michael Price, and Hui Ying Wen6.111 Introductory Digital Systems LaboratoryFinal ProjectDecember 13, 2006Abstract1This project implements a video special effect in which a light-saber is shown projected from a handle held by a user. The saber image is superimposed on live video feed of the user and handle. Color detection of a marker on the handle, as well as input data from an accelerometer and gyroscope embedded in the handle, aided in constructing the resulting saber image.TABLE OF CONTENTSOverview................................................................................................................3Basic Functionality (Hui Ying Wen)Conventions (Hui Ying Wen)Implementation (Hui Ying Wen, Michael Price)Interfacing with External Components (Michael Price)Block Diagrams (Yuhsin Chen, Michael Price)....................................................9General Block DiagramVideo Input and Interfacing with External DevicesMathModule Description / ImplementationExternal Device Inputs (Yuhsin Chen)....................................................12Accelerometer ModuleGyroscope Rate ModuleVideo Input and Marker Detection (Yuhsin Chen)..................................12Video Input and ZBT MemoryMarker Color MatchingMarker PositionMath (Michael Price)................................................................................13Pose ExtractionTransformationPose ModuleMath ModuleControlMatrix GenerationMatrix MultiplicationOutput AccessVideo Output (Hui Ying Wen).................................................................19Slope CheckOrientationLinesVideo OutputXVGADiscussion (Team)................................................................................................21External Device InputVideo InputMathVideo OutputReferences and Acknowledgments......................................................................232OVERVIEWBasic FunctionalityThis machine is an implementation of a video special effect in which a light-saber is projected from a handle held in a user's hand. The image of the saber is tilted, scaled, and skewed according to the user's real-time movements of the handle.The user, holding the saber handle, stands in front of a camera. Live input from the camera, in NTSC format, is written to a ZBT memory, which is then output in VGA format to a monitor. The image of the light-saber is superimposed on the live video feed.The handle has three features that aid in this special effect: an accelerometer, a gyroscope, and a red-colored marker. Real-time data from the accelerometer and gyroscope are transmitted to the 6.111 labkit via wires at the base of the saber handle. This data, which identifies the current orientation of the handle, is used in transformation and rotation matrix algorithms which determine the correct tilt, size, and scale of the light-saber image. In addition, a center-of-mass calculation is performed on the pixels, detected from the live video feed, that comprise the colored marker on the handle. In this way, the pixel coordinates of the base of the light-saber, the origin from which the image should be drawn, are calculated. From this information, the quadrilateral comprising the light-saber is drawn on the VGA display as if coming from the user's handle, in the correct length and tilt.ConventionsThe following conventions are used in the process of calculating and producing the light-saber image: normal vs. pixel space, saber angles, and the ordering of saber points.“Pixel space” refers to the conventional numbering of pixels on a video display:3Screen image of saber with handle.“Normal space” is the coordinate frame, still encompassing the screen, in which the transformation and rotation matrix mathematics are performed.4“Pixel space” for a 1024x748 display. This pixel numbering convention corresponds to the digital signals generated for such a display.“Pixel space” for a 1024x748 display. This pixel numbering convention corresponds to the digital signals generated for such a display.The ordering of the four points of the saber image is as follows:ImplementationTo fully describe a lightsaber's pose, six degrees of freedom would be needed: the position in [x, y, z] space and the vector representing the direction it is pointing. Collecting accurate information about all of those quantities from within the saber handle would require an expensive inertial measurement unit (IMU). Our system breaks down this problem into more convenient pieces:• Position of the base of the beam: measured from video• Orientation of beam: measured by inertial sensors in handleBesides being cheaper than a single IMU, this approach is not subject to drift errors created by integrating acceleration measurements over time. The Analog Devices ADXL213 2-axis accelerometer and ADIS16100 gyroscope, to provide inertial measurements corresponding to the apparent direction of gravity and the handle's rate of rotation about its axis, were selected. Those measurements can be used to estimate the angles of deflection of the accelerometer from each axis in the global coordinate frame. A 1024x768 resolution, 60 Hz monitor was used for video output. Live video feed was taken from an NTSC camera.The project was implemented on the 6.111 labkit, with various switches and buttons used as inputs for testing, debugging, and various module functionalities (see module descriptions).5Point ordering of saber image. Points 0, 3 correspond to the base of the saber. Points 1, 2 correspond to the tip of the saber.Interfacing with External ComponentsThe appropriate communication mechanism was designed for each of the two sensors. The ADIS16100 and ADXL213 chips themselves come in very small surface mount packages, but Analog Devices supplied us with evaluation boards pre-made to support easy use of them (ADIS16100/PCB and ADXL213EB). The ADXL213 chip needs an external resistor to set the frequency of its PWM output. A tradeoff between measurement accuracy and update speed is inherent in determining the PWM carrier frequency: dynamic performance improves as accuracy declines at higher frequencies. A 1 kHz carrier (using R = 120 kOhm) was selected to balance these desires and match the 1 kHz update rate of the lightsaber pose. The ADXL213 provides two synchronous outputs, one representing the component of acceleration in its 'x' direction and the other for the 'y' direction. The duty cycle of


View Full Document

MIT 6 111 - Realtime Light-Saber Generator

Documents in this Course
Verilog

Verilog

21 pages

Video

Video

28 pages

Bass Hero

Bass Hero

17 pages

Deep 3D

Deep 3D

12 pages

SERPENT

SERPENT

8 pages

Vertex

Vertex

92 pages

Vertex

Vertex

4 pages

Snapshot

Snapshot

15 pages

Memories

Memories

42 pages

Deep3D

Deep3D

60 pages

Design

Design

2 pages

Frogger

Frogger

11 pages

SkiFree

SkiFree

81 pages

Vertex

Vertex

10 pages

EXPRESS

EXPRESS

2 pages

Labyrinth

Labyrinth

81 pages

Load more
Download Realtime Light-Saber Generator
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Realtime Light-Saber Generator and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Realtime Light-Saber Generator 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?