Tags:
create new tag
view all tags

Basics

1. Setup the cameras. For best results, adjust each camera and/or the beamsplitter so that the image seen in the camera viewfinders are as lined up as possible. This is simplest if the white guide lines are turned on. Note that one of the images will be reflected.

2. Adjust the exposures. There is a small knob near the front of the camera. Press and hold this knob to bring up the controls. Twist the knob to highlight "Exposure" and press the knob again to select it. Twisting the knob will now change the exposure level.

3. Set the zoom. Given that we currently have no means of ensuring that the amount of zoom on both cameras will always be identical, zooming all the way in or all the way out is the most accurate zoom setting at present.

4. Attach the Arduino control to the cameras and place the box over the setup. In the event that the box is unavailable, place some black material directly to the left of the setup. If there is anything between the beamsplitter and the black material, it will show up on the cameras.

MDA HDR

1. Download the files to your computer and convert them from .MTS files to MDA files.

2. Perform a homographic calibration on the files and stack the MDA files from each camera for easier processing.

3. Run mda-hdr on the stacked files. Command: mda-hdr brighter.mda darker.mda (mda-hdr-single combines individual frames)

Homographic Calibration

1. Once you have two mda files, let's call them cam1.mda and cam2.mda, one from each camera, extract one frame from each of them with full checkerboard in sight, rename them to cam1.jpg and cam2.jpg.

2. Copy image files to where you store the HDRCamAlign Matlab scripts, run Matlab and and enter hdrcamalign. metadata.xml is automatically generated by running hdrcamalign. Move file to where two mda files are.

3. In terminal, enter "mda-homography metadata.xml < cam1.mda > cam1_out.mda"

Note:

1) Unless you're doing homography on only a few frames ( by a few, I mean single digit number ), IMO, the best way to do it is to write a script, so that mda-homography process one frame at a time and write output to each file.

2) Depends on whether or not you flip one of the image/video before computing the homography matrix, the steps can be a little different. We assume one of the image ( cam1.jpg or cam2.jpg ) is flipped. If not, just comment out the flip function call in hdrcamalign.m.

3) When running mda-homography, if you see the error: "terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted" It means that the mda files is too big that your computer runs out of memory when processing it. Try to resize it or process fewer frames at a time.

Temporal Figure Alignment

1. Run im_putIndex on both mda files. Identify which camera starts shooting first and starting which frame both images are synchronized. Record the frame number.

2. Run mda-cutframe to cut the unsynchronized frames out of the mda file.

Note:

1) HDRCamera_Project.pdf is included here to explain more in-depth.

2) im_putIndex is a shell script I wrote to put index on each frame in an image sequence. The purpose of it is to ease the trouble identifying the first synchronized frame, so you can see the image and then crop the mda file directly knowing where to cut. Usage: im_putIndex mdaFileName

-- Main.lancefu - 16 Jul 2009

-- Main.rachteo - 14 Jul 2009

Topic attachments
I Attachment History Action Size Date Who Comment
PDFpdf HDRCamera_Project.pdf r2 r1 manage 73.6 K 2009-07-16 - 21:18 UnknownUser HDRCamera Project Documentation
Unknown file formatext im_putIndex r1 manage 1.7 K 2009-07-16 - 08:24 UnknownUser put index on each frame in an image sequence
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r8 - 2009-07-20 - lancefu
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback