Marks:
Objective
ENGO 531
Advanced Photogrammetric and Ranging Techniques
Laboratory Assignment 3 Camera Self‐Calibration
This assignment constitutes 20% of your final grade.
The objective of this lab is to perform a self‐calibration of your own camera and analyze the results. You will design a target, a target field and a network and collect images and perform the calibration. You will add new functionality to your bundle adjustment program. The calibration results from this lab will be used for lab assignment 4.
This is an individual assignment. Collaboration between students is anticipated and encouraged. However, each student is to submit their own, original work. We will check for plagiarism.
New program functionality
The functionality to add to your program is the estimation of the IOPs. It is suggested that you implement another mode of operation option in your software to permit IOP estimation. The only IOPs you need to estimate are the principal point and principal distance since they are the basic elements and are relatively straightforward to implement into the model. You do not need to implement the estimation of the lens distortion coefficients since this is much more involved. You are to assume that your camera images are corrected for lens distortions.
Assignment
Data for this assignment are not provided. You will collect data with your own camera. It is suggested that you use your mobile phone camera since the imagery is (mostly) corrected for lens distortions. If you notice excessive lens distortion in your camera imagery, don’t use it. Contact the Instructor. If you don’t have access to a suitable camera, contact the Instructor. In Lab 4, you will measure an object of your choice with the same camera and use the IOPs you estimate in this lab.
You must design a target to be used for your calibration. The design need not be complex, but it should be dimensionally stable and rigid during the image capture process. The design can be a simple, such as a high contrast target printed on paper, for which the centre would be measured, or crosses of black electrical tape on a light background for which you might measure one corner. The latter was what the
ENGO 531 Lab 3 Fall 2020 Page 1 of 4
Instructor used for his solution to this lab—see Figure 1. Make sure you specify exactly what point on the target is to be measured, i.e. the centre or a particular corner or point of intersection.
Figure 1. Calibration target field and object space coordinate system.
Design a calibration field somewhere in or outside your home. It need not be large like the facility in END 305, but remember the principles of good network design! Thirty to forty targets should suffice. Note that you may need a couple iterations of the target design and test field design to ensure they suit your camera’s field of view and imaging capabilities.
Install your calibration field. Define a local coordinate system and an origin point. Usually the Z axis is defined to be up (the opposite direction of gravity) and X is aligned with one of the principal dimensions of the target field. See Figure 1. Measure the 3D coordinates of your targets. These only need to be approximate values, so you can use a tape measure, but they should be carefully measured. An accuracy of a few centimetres will be sufficient.
Design a calibration network and acquire images of your target field with your camera. The design should consider the zero‐ and first‐order design measures discussed in class. Note that there is no obligation to implement the inner constraints into your program for this assignment, but your datum definition must be minimally constrained. We have discussed several FOD measures in the lectures. Environment conditions will likely be such that you can’t exactly achieve the ideal geometric network conditions. The important outcome is that you follow the principles of good network design as best you can within the environment (i.e. space) constraints. If you can’t achieve certain aspects of the design, simply explain why and what the ramifications are on the results. Eight to ten images should be sufficient.
If your camera can capture imagery in different modes, be sure to note the details so that you capture data in the same mode for Lab 4. IMPORTANT: make sure you carefully determine the approximate EOP values of each image. High accuracy is not required for position—a few decimetres will be fine. The angles only need to be within a few tens of degrees and can be determined by eye, but they must be in the correct quadrant for the adjustment to converge. Both the magnitude and the sign of the angles are often
ENGO 531 Lab 3 Fall 2020 Page 2 of 4
confusing in close‐range photogrammetry, so take time to carefully figure out the angles. Pay close attention to the rotation angle, specifically whether you rotate the camera clockwise or counter‐ clockwise. Failure to do so may lead to you wasting an awful lot of time and becoming very frustrated. Often the best way to derive the angles is graphically by constructing the rotation matrix M. Make a sketch of your coordinate system, the approximate image locations and the axes of image space at each location. See Figure 2 for an example. For hand‐held imagery looking at the target field and the coordinate system definition shown in Figure 1, is nominally 90 (20, depending on how much the camera has been inclined or declined), the angle roughly corresponds to the horizontal direction in which the camera’s optical axis is pointing (rotation about the y axis in Figure 2) and is 0, ‐90 or 90 depending on whether the camera is in landscape or portrait mode and in which direction it has been rotated about the z axis. You are strongly advised to review the rotation conventions used in this course and in ENGO 431.
Figure 2. Deriving approximate rotation matrix; (0, 0, 0) = (90, 0, 0)
Measure the targets in the imagery. There is no need to develop an algorithm to precisely measure the targets. Manual measurement is fine. You just need to ensure that your target has a clearly defined centre or corner that you can measure. I suggest use of a free image viewer such as IrfanView on PC (or Gimp on MacOS) that allows measurement of image coordinates. To do so in IrfanView, place the cursor over the target, hold down the left mouse button and read the coordinates. Note that these are in a left‐handed coordinate system relative to the upper‐left corner of the image, so you will have to transform them prior to input into the bundle adjustment (see bundle adjustment part 1).
Determine the approximate IOPs. The approximate principal distance can be determined from the EXIF data. In IrfanView, select EXIF info under Image | Information and locate the FocalLength value. Do not use the FocalLength35mmFilm value. The image centre can be used as the approximate principal point location. However, you need to find the pixel spacing. This will require an internet search for the specifications of your camera. You may need to derive it from the sensor size. It will be on the order of a few micrometres. Do not use the XResolution and YResolution values from the EXIF file. If you are using MacOS, you can find this same information by using the Inspector in Preview.
Note that the selection of units is very important in a bundle adjustment. Object space coordinates (tie and control points and PCs) can be in mm. Image space units can be in pixels, millimetres or micrometres. Any of these three choices is perfectly fine, but do not mix units! Your image measurements will likely be in pixels but the focal length from the EXIF data will be in millimetres. You must decide which to convert (principal distance or image points) and calculate the principal point in the same units. In terms of significant figures, image space quantities (observations, IOPs, etc.) are usually reported to the nearest
ENGO 531 Lab 3 Fall 2020 Page 3 of 4
hundredth of a pixel or tenth of a m. Object space coordinates are usually reported to the nearest tenth of a mm. Angles can be reported to a thousandth of a degree.
Perform the self‐calibration adjustment. It is suggested that you do this in stages. First, run an initial adjustment with fixed GCPs and fixed IOPs. As long as you have done a good job determining the approximate GCP coordinates, IOPs and EOPs, this adjustment should converge. Note that the residuals may be quite large due to the low accuracy of the approximate coordinates determined by tape measure. If this adjustment does not converge, it is likely due to either outliers or poor approximate values. In this case, you should break down the adjustment to a single image. Once that solution converges, add a second image and so on. Once the adjustment with all images converges, then run the minimally‐constrained self‐ calibration adjustment.
You must choose the standard deviation of the observations. It is suggested that you use a single (global) value for all observations. Thus, the weight matrix will be a scalar matrix. The value of the standard deviation should be judged from how precisely you believe you can observe your targets in the imagery. If in doubt, you can start with a value of 1 pixel (or equivalent in mm or m). However, you should justify your final choice based upon certain bundle adjustment outputs.
Submissions
You are to report on the findings of your camera calibration, in particular the following aspects:
Details of the camera you calibrated
5 marks
Description of the target you designed
3 marks
Description of the target field you designed
5 marks
Description of the geometric network you designed for the self‐calibration
10 marks
ZOD
FOD
Self‐calibration results and analyses
12 marks
The overall summary
The fit of the observations to the model
The estimated IOPs and their quality
The completeness of the IOP model
Five (5) marks will also be allocated to the report presentation. The total for the report is 40 marks. Bonus marks may be awarded at the TA’s discretion for instances where a student has demonstrated more detailed analyses or a deeper understanding that go beyond expectations.
Note that the quantities you analyze are for you to decide, but your analyses are expected to be detailed and justified. It is strongly suggested that you include plots and tables to support your observations.
Submit your formatted report with source code in an appendix. Submissions are to be uploaded as a single PDF file to the D2L Dropbox by the specified date and time.
END OF LAB 3
ENGO 531 Lab 3 Fall 2020 Page 4 of 4