Thursday, December 3, 2009

HSV: Arrows and Fruit



In case you've never seen what an arrow going through fruit looks like in 333x slow motion.

These videos were shot with a Phantom high speed video camera in the Edgerton Center Strobe Lab during a freshman seminar. The lighting came out very well, even at 10,000 frames per second. Everyone's favorite seems to be the one where the arrow misses, taking out the cups but leaving the fruits hanging in mid-air. Newton's first and second law in action.

An interesting side note: the Phantom capture software saved the video in raw 8-bit format at a resolution of 512x256 (exactly 512x256 bytes per frame, no compression). But it added a .mov header. Although Quicktime could play it, my custom video converter tried to extract the frames as raw data. It put the header in as dummy pixels on the first frame, then all subsequent frames were shifted by that amount (so that they looked off-center). The fix was some very simple math:

  1. Divide the file size in bytes by (512x256). Take the remainder.
  2. Subtract that number of bytes from the file using a hex editor. This is the header.
  3. Confirmation that the header ends after this number of bytes:

A wonderful little tag "mdat" (movie data?) at the exact address of the remainder. I love raw video! Compression is for losers.

No comments:

Post a Comment