Matchmoving for Microstation

SynthEyes-to-Microstation
SynthEyes is a software that pulls 3D coordinate and positional information from a series of 2D images (a video clip). Using a combination of trigonometry and computer-vision techniques, it is possible to infer a virtual camera location that corresponds to the position of the camera used to record a video clip. This position can then be remapped to a series of “position tracks” within the scene to give you coordinates upon which to composite your virtual building model. The output from SynthEyes can then be imported into Bentley Microstation (the second part of this tutorial) where you can setup the lighting and rendering parameters to animate the scene. Begin the matchmoving process in SynthEyes.

12-1-2008-9-00-30-amOpen up shot in SynthEyes. File -> Open. SynthEyes accepts common video formats and should read all the video “meta-data” from your video if it was generated digitally. The frame-rate, interlacing, image and pixel aspect ratios should be correct. If your clip was generated with an older analog camera, you may need to track down all this information from the video capture program you used to import the clip.

12-1-2008-9-07-46-amStart the Auto-track on the clip.

Click the large “Auto” button in the upper-left:
This does the 2D and 3D “inverse” homography to figure out the camera movement and focal-length from the motion. This computes the cameras path through the scene relative to the tracked locations.

12-1-2008-9-11-13-amCreate a coordinate system to snap the reference plane to the ground. Click the “Coords” button on the left-hand side of the screen. Now, in the camera viewport, click three co-planar reference points in sequence. SynthEyes will ask you if you want to Apply the coordinate system. Click “Yes.”

12-1-2008-9-22-36-amRefine the solution by clicking “Ok” in the window that appears. This snaps everything to the newly created X-Y plane.
Stabilization (if necessary). Save out the image sequence. Open the Image Preparation window (Shot à Image Preparation) by pressing the “P” key. Switch to the “Output” tab. This opens the “Save Processed Image Sequence” dialog. Click the “…” button in the upper-right to open a “Select Preview Output File Name” dialog. This allows you to select where you want to save your image sequence. Navigate to an appropriate folder of your choice (choose something convenient that you can navigate back to if need be) and switch the “Save as type” to “JPEG Sequence.” Click “Save” when finished. Back in the “Save Processed Image Sequence” dialog, click the “Start” button to save the image sequence to your preset folder with the assigned file names.

Change the shot images to be the image sequence. This replaces the video clip with the single image frames we saved out in step 5 above. Microstation only works with raster/bitmap images as backgrounds, not video-clips.  Navigate to Shot -> Change Shot Images. In the browser, navigate back to the folder in which you just saved your image sequence. Click the first image in the sequence. When the import dialog appears, click “OK” to accept the defaults.

Apply Stabilization to trackers (if necessary).
[Instructions UNFINISHED]

Refine the tracking solution for the 3D points.
Click the Calculator button on the upper panel. This opens the “Solver Panel” on the left-hand side of the screen. Click the “Go” button. This refines the solution to solve for the 3D position of the selected points. Click “OK” when finished.

Export the track. Go to File -> Export. Select “Bentley Microstation” in the flyout menu.
Save your track sequence file (for further refinement if necessary). File -> Save.

Microstation
Now it’s time to switch to Microstation or Bentley Architecture.

Import the .MSA file into Microstation.
Open the Animation Producer dialog box under the Visualization task tab.
In the Animation Producer dialog, select File -> Import .MSA File.
Navigate to the exported .MSA file you generated in SynthEyes.

Adjust the viewport settings. In the viewport settings dropdown in the animation viewport, make sure that “Background” is checked on. Also make sure that “Camera” is checked.

  1. Set the viewport resolution to match that of the video-clip. Navigate to Settings -> Rendering -> View Size. Adjust the size to match that of the clip resolution.
  2. Select the correct viewport number (typically 2).
  3. Turn off Proportional Resize
  4. Set X and Y sizes as follows. Multiply the height(Y) of your image, in pixels, by the aspect ratio (usually 4:3 for standard video or 16:9 for HD) to get the width(X) value. For example, if your source images are 720×480 with a 4:3 aspect ratio, the width is 480*4/3 = 640, so set the image size to X=640 and Y=480, either directly on the panel or using the “Standard” drop-down menu. This process prevents horizontal (aspect-ratio) distortion in your image.
  5. Hit Apply. Turn Proportional Resize back on.Close the viewsize dialog.
Open the Animation Preview dialog. Scrub the play head back and forth to make sure the background images loaded correctly.

[to be continued]

Leave a Reply