Step-by-step Introduction for creating survey data from reference frames [01/15/06]
Author:
Daniel Schaffer, Science-D-Visions

Required Version: 3DE V3 R5
 

In this article, I will show you how to build a digital copy of a set and how this can be used later in the matchmoving process. You can download all the project data and the pictures I used. At the end of each step, you will find various projects with all the steps included.

The different steps:

  1. Taking photos
  2. Importing frames & adjusting the camera in 3D Equalizer
  3. Converting points to surveyed
  4. Importing survey data in a matchmoving project

1. Taking photos

First of all I had to shoot photos of the set. I selected some points of view around the set in order to get different perspectives. For my project, five photos were sufficient. The accompanying figure shows the points of view in relation to the building.

Theoretically, it is possible to work with two photos, but the more views you have the more precisley 3D Equalizer can calculate the point positions.

I took all photos using exactly the same focal length, i.e. the same aperture angle. It is much easier for 3DE to calculate the focal length if it is the same for all photos.

If one uses different focal lengths for each photo, the focal lengths must be entered in 3DE by hand, since they cannot be calculated by the system.

 

Points of view of the photos

I used a standard digital camera with 6 million pixels resolution. This high resolution is useful in order to precisely identify the feature points in 3DE. Additionally, I measured the distance between two points at the building. By passing this information to 3D Equalizer it is possible to construct a correctly scaled model of the set.

Generally it is recommended to measure two points lying far away from each other in order to get a better precision.

 

2. Importing frames & adjusting the camera in 3D Equalizer

Among all the photos, I selected five which showed the building from preferably different points of view.

 

In 3DE, I created a new project and imported the photos by selecting Frames Window::Add::Add Ref. Frame.

Then I created a new pointgroup by Pointgroups Window::Pointgroup::Add Pointgroup and selected ¨Camera Group¨ in the Pointgroup Type box.

Adding reference frames


For a correct camera adjustment it is sufficient to set at least 10-15 points in at least three frames.

I selected the central and the outermost views for setting points (see picture below). Then I specified some points uniformly distributed in the three different frames and preferably present in all frames.

In the Camera Adjustment Window I left the "Pixel Aspect" on its default value (1.0).

I left the lens distortion at the default value 0.0, since my camera did not seem to exhibit a significant lens distortion. For the horizontal aperture angle, the only information I had was, that it was the same for all photos, so I set the ¨Horizontal Angle¨ mode from ¨Fixed¨ to ¨Unknown¨ and pressed the ¨Adjust¨ button.

Camera adjustment

The three photos I used for adjusting

Orientation view of the points set so far

 

The result was a horizontal angle of 52.79 degree  and a pixel deviation of sligthly below 0.5 pixel, as shown in the Status Window. Please see project ¨ref_frames_adjustment¨ for details.

 

I added more points in all frames taking care to do this as precisely as possible. Setting more points results in a more detailed point model of the set.

All points set in all frames

After setting all points in all frames I calculated the point model by clicking Main Window::Calc::Calc All Objects From Scratch and checked the results in the Status and Orientation Window. Since the deviation was too high and the point model in the orientation view did not seem to be right, I went through the frames and checked the points. In order to do this I turned on Zoom Window::View::Show Reconstructed Points::Distortion. The 3d points were shown as green crosses and I could easily detect those who deviated from the 2d points.

The steps so far are demonstrated in the example ¨ref_frames_tracked¨ project.

3D view of the point model

 
3. Converting points to surveyed

Satisfied with the results I aligned the point model correctly in the 3d world. To align the model in the Orientation Window, it is sufficient to work with just three points. I selected those points around the door in the backround. Note that these three points should span a possibly large area of your object. Here, I used one point at the top of the door and two points at the bottom, so I got a triangle (points 53, 60 and 62 in the example project).

By clicking Orientation Window::Orientation::Align 3 Points::XY-Plane, the point model was rotated so that the three selected points finally lied in the XY-plane. Further, I deselected one point (the top point 53) and pressed Window::Orientation::Align 2 Points::X-Axis in order to rotate the remaining two points parallel to the x-axis.

I added some dummy objects to check the geometry of the point model.

Final point model with dummies

One important note: In reality, the building is not absolutely vertical to the ground, but in 3D Equalizer aligned to it. This causes a problem with aligning dummies in later matchmoving projects. In the later project, the dummies seem to be inclined. To solve that problem, I had to rotate the point model in the current project a little bit. This must be done before baking the scene!

By pressing the ¨Perspective/Orthognal Projection Toggle Button¨, which is the button with the cube symbol on the right side of the Orientation Window and the button ¨Side¨ on the left side, I got a better view. I aligned the point model again by rotating point 60 that the entrance door tips over a little bit (see picture below). New dummies fit now perfect to the point model and look also much better in the Preview Window.

The point model was now aligned correctly with respect to the world coordinates.

As I said in the beginning it is useful to measure the distance between two points on the set and to enter it in the ¨Modify Pointgroup¨ window.
I double-clicked on Pointgroup Window::pgroup1 and activated the option ¨Distance Constraint Enabled¨. I chose the two points I had measured before (point 41 and 45) and entered the value in the text field. The scale of the point model changed accordingly.

In order to get a surveyed model of the set, I converted the survey-free points to surveyed points by running the TCL script ¨bake_scene.3detcl¨.

This script fixes the positions of all points including the global transformations performed in the Orientation Window. You can download it from  www.3dequalizer.com/sdv_html/tech_art_frame_intro.html.

Afterwards I reset the orientation by Window::Orientation::Reset in order to obtain the final result of the TCL script and clicked ¨Main Window::Calc::Calc All Objects From Scratch" again, causing 3D Equalizer to calculate the camera positions in relation to the points.

 

The final project is shown in the example ¨ref_frames_final¨.

Finally, I exported the survey data in a txt-file. I select all points of the pointgroup and chose ¨export_survey_txtfile.3detcl¨ for saving them into an ASCII- File.


So, we're finished with the reference frame part. As you can see, I got an excellent and precise point model of my set. Since I converted the points to exactly-surveyed points, the point model will never change its translation, orientation and scale again. In the next  steps I will demonstrate how the fixed point model can be used for matchmoving camera sequences.

4. Importing survey data in a matchmoving project

I created a new project, added a new Pointgroup and imported the survey data from the textfile I created in the previous section by running the script ¨import_survey_txtfile.3detcl¨. I checked the point model in the Orientation Window.

In order to calculate the camera movement, it turned out to be necessary to track very precisely. It also turned out to be sufficient to track only 20-30 instead of all 84 points. I did not only use the surveyed points from the reference project described before, but also tracked some new survey free points, e.g. points on the floor in the foreground in order to increase precision.

Since many points in this type of projects are surveyed, 3DE cannot compensate tracking errors by repositioning point positions. On one hand this makes the camera path much more precise, but on the other hand requires precise motion tracking.

After tracking the points I calculated the project by Main Window::Calc::Calc All Objects From Scratch and checked the camera path in the Orientation Window as well as the deviation in the Status Window. After correcting some badly tracked points, I finally got the correct camera movement.

No matter how many different sequences I track, the point model is fixed and remains unchanged. This makes it easier to build models within the animation system to which the point and camera data are exported.

The project files ¨entrance_sequence01¨ and ¨entrance_sequence02¨ contain two different camera paths matched to the same fixed point model. One sequence was recorded from a car driving around the entrance and the other one by walking along the building.
 
Project data:

 

reference frames

frames "entrance_sequence_01"

frames "entrance_sequence_02"

ref_frames_survey_txtfile