1 (edited by James_Hollingsworth 2009-04-15 12:41:39)

Topic: correct entry of camera calibration information with aerial photos

Ok, firstly let me set the scene...

I have a SPOT5 orthoimage (created using COSI-Corr), which I used (along with SRTM topo data) to provide reference information when I extracted a stereo DEM using PCI's Orthoengine module for 3 overlapping aerial photos. However, whenever I included the camera distortion information, the correlation failed in the corners of each image during the DEM extraction. This made me think there might be a problem with the camera distortion info I entered. Anyhow, I extracted a good stereo dem without the distortion info. I used this stereo DEM, along with the original SPOT5 orthoimage to orthorectictify one of the stereo aerial photos in COSI-Corr (including the camera distortion information this time). I then used this ortho aerial photo and stereo DEM to orthorectify one of the other overlapping aerial photos, taken from the same time. Why? Because I wanted to check there was no deformation signal between the two aerial photos - and if there was, to try to identify why and where it comes from. Anyway, during Correlation I did get a strange looking deformation signal (which only broadly correlates with topography), with deformation signals of between -2 m and 2 m. Significant, considering there should be no deformation at all! Therefore, there is a problem somewhere with the orthorectification of the aerial photos. Because the stereo DEM I am using looks good, I am not sure this is the cause of the problem (it might be adding to it, since it was created without distortion info)? However, I am suspicious of the camera calibration info, which caused the stereo DEM extraction to fail in the corners. Therefore I was thinking maybe I am entering this information incorrectly in COSI-Corr, and this is what is causing this strange deformation signal? Phew... sorry that took so long to explain.

So now for my current problem!:

... so I suspect I am entering the camera calibration information incorrectly in COSI-Corr. I went back to check carefully how to enter this info... any I have some questions!

So the raw aerial photos arrive in .tif format, and look like the following image:


I rotate these by -90° to give the following image, because it is easier to work with the image when the top = N, left = W, right = E, bottom = S:


However, the Calibration Report gives info for this image "upside down" to the image I have. For example (note x increases to the right, and y increases down):


So my question is: when entering the calibration info for my aerial photo, do I simply rotate the info above, or do I mirror it? For example:

rotated 180° =

or mirrored:

It must be important which one I do. In the mirrored version, the xy is the same as cosi-corr (i.e. x increases to the right, and y increases up); therefore, the sign convention of the PPA doesn't need to be changed. Also, the fiducial measurements for the left and right sides of the image will be opposite to the 180° rotated version.

Finally, if the 180° version is correct, does this rotation affect the radial distortions. In other words, do I need to change the sign for the radial distortions? Will mirroring the image also affect these distortions? In COSI-Corr I enter this distortion info as "radial distance" in mm (e.g. 20) and distortion in um (so for the 20 mm example, the distortion would be -5 um) - is this correct? Here's the radial distortion table for the 1982 images:


Of course, I could be being dumb and maybe I've missed something obvious?...



Re: correct entry of camera calibration information with aerial photos

Hello James,

thanks for all the details, it makes the problem understanding much easier smile

I'll start with the Interior Orientation setup in COSI-Corr:

You need to enter the calibrated principal distance (also called, slightly abusively, "calibrated focal length"), in meter: 0.15177 in your case.

The principal point you need to consider during the IO setup is the "Point of symmetry" (usually called "Calibrated principal point"), and not the "Principal Point of Autocollimation". The point of symmetry (or calibrated principal point) is defined such that all distortions are the most symmetrical. Distortions can therefore be best averagely corrected.

Camera calibration reports can use different reference systems to provide calibration parameters (clockwise v.s. counterclockwise orientation, origin, etc). However, to keep things simple, camera reference systems provided in calibration reports generally apply to "positive" images (i.e., scenery as you would see it from the aircraft). The reference system provided in your report follows that rule; the graph is given with the camera viewed from the back, which corresponds to a positive image seen from above.
To align the data strip with your image, you therefore need to rotate the calibration graph by 180deg, as you suggested. No mirroring then. As your image is 180deg rotated in respect to the calibration system, you will associate fiducial points on your image to their measurement accordingly. For example, the top left fiducial point of your image will be associated with the fiducial measurement (4).
Attention, whichever is the calibration system orientation, you must not change any sign during the Interior Orientation (fiducials, PPS, PPA, etc). Just stick to the camera reference system as given by the calibration report, and do not consider COSI-Corr orientation system !!! The pb you encountered in your past post was not due to the IO, but to a bug in COSI-Corr that did not account for the camera orientation properly. The workaround I found at that time was to modify the IO, but that is not the case anymore. So remember, do consider only the camera reference system from the report.

You entered them correctly:
- use the mean distortion
- radius in mm and distortion in microns.
Notice that whatever is the rotation, it does not affect the mean radial distortion.

So to sum up, if you entered:
Focal length: 0.15177
Principal point: x:0 y:-0.001
Fiducial measurement: top-left:(4), top-right:(1), bottom-left:(3), bottom-right:(2)
Radial distortion: (20, -5), (40,-4), (60,-3), (80,1), (100,1), (120,5), (140,11)
you should be good.

Now, regarding the pb with your orthoimage:

Why did PCI fail in the corners during DEM extraction with camera distortion ? I don't know. However, if you did not use the camera distortion in the PCI DEM extraction, I would recommend you do not use them in COSI-Corr either for consistency.

I am not really surprised that the two overlapping orthoimages correlation gives deformation signal. I was expected however the deformation to be correlated to the topography. DEM extracted from optical images have a spatial resolution lower than the images themselves. All topography cannot be corrected when the images are orthorectified at their nominal resolution. The topography "left" in the orthoimages may be then recovered during correlation (depending on the correlation sensitivity).

I suggest to check the validity of your IO, and if correct, try a correlation of two overlapping orthoimages without accounting for the camera distortion to see if the strange distortion is removed. Usually radial distortion is almost negligible compared to DEM error distortion, and sometimes also, to film distortion and scan artifacts.

Let me know what you find out.



Re: correct entry of camera calibration information with aerial photos

Excellent, that was very helpful... I've also chatted about radial distortions with Sebastien, so I'm a bit more clued up on what's going on with this.

So one correction (I think) from what you say specific to my case:

So you say I must use the 180° rotated case (as shown in my above posting). However, in this image the camera reference system has x increasing to the left, and y increasing to the top. Therefore, the calibration report gives, for example, fiducial point 4 (top left of my image) as x = + and y = +. However, COSI-Corr requires the top left (i.e. fiducial 4) to be x = - and y = + (because x increases to the right and y increases up in COSI-Corr). So basically the x sign must be inverted (just in this case). This is also consistent with page 13 of the new COSI-Corr manual, in which fiducials 2, 4 and 6 on the right hand side of the image all have positive x values.

As a verification, I tried optimizing some gcps following your remarks in your previous post (i.e. x = + on the left side of the photos) and COSI-Corr was not able to optimize successfully. However, when I changed the fiducial points so that ones on the right hand side of the image were x = +, and ones on the left were x = - the optimization was successful.

So regarding your other comments:

I am currently running COSI-Corr to see what the displacement field looks like when I do not include the radial distortions. As you say, the stereo DEM is of lower resolution than the input aerial photos (DEM is 1m / aerial photos are 0.5m). Therefore all the topography cannot be corrected during orthorectification. So in an attempt to minimise the affect of remaining topography during correlation, I will also orthorectify/resample the aerial photos at 1m rather than 0.5m.

On the whole, things are not looking too good for this project. I am trying to correlate two aerial photos from 1982 and 1990 to look at ground deformations during an extension / eruption event in 1984. However, the two aerial photos do not exactly overlap, and the DEM we are using to orthorectify the photos is a 1m stereo DEM (in turn made using an orthorectified SPOT5 image and SRTM DEM for reference). No matter what I do I ALWAYS have deformations of the order of 1-2m across the image, making it impossible to look at the 1m of extension during the 1984 event. Not sure where to go from here... sad

I now see how important it is to have exactly overlapping pre and post images, since this reduces the need for perfect and high resolution topography (which is always very hard to aquire). I guess this is why Hector Mine worked so well. It's a shame everyone isn't as careful as the USGS when aquiring aerial photos...


Re: correct entry of camera calibration information with aerial photos

Hello James,

OK, I double checked and there's (still) a remnant bug which causes your GCPS optim to fail if you don't invert the fiducials x sign. Everything works fine if the fiducials camera coordinates are expressed in a positive counterclockwise system, but fails if the reference system is positive clockwise. Inverting the x sign, as you do, 'invert' the reference system which goes from positive clockwise to positive counterclockwise. That said, COSI-Corr is supposed to handle both systems, and as far as you are concerned, you normally (i.e., without that remnant bug) should not change any sign. So remember, for now it is OK, but once that bug is fixed, no more sign inverting.

The USGS NAPP images (Hector Mine study case) are indeed well suited for surface change detection applications. First, photos from the same strip overlap sufficiently to allow DEMs extraction, but also, in addition to various specifications (cloud cover, attitude, sun illumination), image geolocalisation follows high constraints which lead to multi-temporal photos almost entirely overlapping (suppressing most of topographic artifacts).

In your case, you are working with 0.5m resolution images, looking for 1m deformation. Depending on the stereoscopic angle and topography of the scene, the DEM accuracy and resolution must be high enough to correct topo with residual less than 1m. The 1-2m topo residual you always find in your correlation map means that the DEM doesn't have enough resolution. If you extracted a DEM from 0.5m images, the 'real' DEM resolution cannot be 1m. Remember that DEM extraction is based on relative displacement between stereoscopic images retrieved from cross-correlation. The cross-correlation uses image chips which must have a minimum size (~10 pixels) to succeed. Below that critical size, correlation results are necessarely regularized/smoothed and the 'real' DEM resolution isn't as high as it is supposed to be (to exagerate a little, it is like interpolating a 5m DEM to 1m).

Images do not have necessarely to overlap perfectly to succeed in surface change detection. It is a combination of three parameters:
1- stereoscopic angle between the images (related to the difference in overlapping)
2- topography roughness of the scene   
3- resolution and accuracy of the DEM.
The more of 1 and 2, the more of 3 you'll need. If 1 or 2 are tending to null, then you can 'afford' to have high 2 or 1 respectively, and an average DEM.

Some tips that may help you:
- the topo artifacts is only found in the stereoscopic direction. If you have an idea of the direction of the deformation you are looking for, try to find a pair of image whose stereoscopic direction is orthogonal to the deformation. For example if the extension you are looking for is in the vertical direction (of your image), try to find a pair of image whose stereoscopic direction is horizontal.
- If the deformation you are observing is not really related to the topography and is a long wavelength deformation, it may be due to film distortion (prior to scan).
- Make sure when you select your tie-points between the ortho master and the raw slave to select locations where the ground did not sustain any ground deformation. If not possible, you need to have ground displacement estimates at these locations.

Let us know...