Forum

Author Topic: Workflow with calibrated camera  (Read 10564 times)

piste

  • Newbie
  • *
  • Posts: 49
    • View Profile
Workflow with calibrated camera
« on: May 16, 2015, 05:26:41 AM »
Good day!
I`m mapping geological features called breccia pipes in Arizona along a huge gorge.
It`s gonna be a massive project (almost 1000 pictures from ground based camera stations)...

I`m using a Canon 500D plus a 35mm lens calibrated in Photomodeler using a grid of 9 sheets and coded target printed on them (calibration seems be pretty consistent according to the report).

For every camera position have been recorded coordinates on the ground using a DGPS in RTK mode (offset in altitude has been measured with a roll meter).
I drove on the other side of the Gorge to put several GCP, surveyed always with DGPS.

I  tried to process quickly just a few pictures to see which results could be achieved but I got a bit confused.
I noticed that reprojection error is surprisingly high...
I usually import my pictures, my calibration file (correctly converted using Agisoft Lens), tick fix calibration and run alignment step (in reference mode).
I would expect everything matching with topography known, but when I upload GCP coordinates, there`s a big offset sometimes...

So basically, what would be the correct procedure to be followed when I have all these data available?
I noticed that everything improves if I optimize camera parameters based on GCP coordinates...
Could be due to different conditions between calibration "environment" and field work?
(when I took pictures for calibration aim I was a couple of meters far from sheets, now I have to build a model of rockwalls far about 400/500 meters from camera stations...).

Should I let Photoscan calculate new parameters?

And if I didn`t have GCP on the other side, is there any way to model the gorge accurately and correctly just using the calibration file and coordinates of camera stations?

Thanks for any answers!
See ya

Davide

nadar

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Workflow with calibrated camera
« Reply #1 on: May 17, 2015, 03:20:57 PM »

I created a calibration site (2 perpendicular walls with 20 painted markers (small crosses).
I measured the position of each marker with centimeter-accurate total station).
I take a serie of photos of this site (at various distances, but always with focus at infinite distance). I take landscape and portrait pictures.
I do a good optimisation of the set and save the resulting calibration parameters in a file.
I do the same for each camera I'm using

Then I acquire the photos of the project (usually aerial photos), vertical with one camera and obliques with another.
I use also GCP measured as accurate as possible (sometimes centimeter, often sub-meter).
I optimize the model on the GCP, but FIX the calibration on the predefined calibration values.

This method usually gives good results, but it is very possible that different working environments (température) generates some bias in the camera calibration.

piste

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Workflow with calibrated camera
« Reply #2 on: May 19, 2015, 03:42:37 AM »
Thanks nadar for your reply!

I have calibrated my fix 35mm lens using Photomodeler and a 3x3 grid of paper sheets with 5 coded targets on each (total of 45).
Camera was set on autofocus.
Distance between me and target around 3 meters.
Pictures were taken from 4 positions around targets, 3 pictures from every position (2 portrait and 1 landscape).

Field work condition right now: rockwall far 450 meters from me.
Same camera and lens but different focus distance (AF set).
Coordinates of camera stations known, GCP on the other side of the gorge visible and known.

Workflow in Photoscan:
Align pictures using reference mode and precalibrated  configuration (not fixed).
In this way align over 200 images is pretty quick.
After that I`m gonna optimize the pointcloud based on GCP coordinates.

My question is: which camera parameters should I optimized if my camera is already calibrated?
Should I do it, since my calibration site and fieldwork site are pretty different?
If I fix the calibration file in Photoscan, is not possible to optimize the pointcloud (camera parameters are untouchable)...
So how do you do that?

I`m looking for suggestions to run out this project using this data and to understand how perform other similar projects in the future without necessarily the need of recording GCP on the ground (long range ground based photogrammetry or aerial photogrammetry).

Thanks to all

bigben

  • Sr. Member
  • ****
  • Posts: 406
    • View Profile
Re: Workflow with calibrated camera
« Reply #3 on: May 19, 2015, 10:53:47 AM »
If I fix the calibration file in Photoscan, is not possible to optimize the pointcloud (camera parameters are untouchable)...

If you've removed "bad" points from your sparse cloud, optimising will still adjust the camera positions/orientations.

Optimising lens parameters would technically be distorting your images to fit the derived data but  if the changes are very small it may not be significant to the overall accuracy. If you were going to try that, I would first align with fixed calibration, then untick the "Fix" box and (changes from Calibrated to Predefined) and perform the optimisation.

piste

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Workflow with calibrated camera
« Reply #4 on: May 20, 2015, 04:39:20 AM »
Hi bigben and thank you for your visit!
I just checked that yesterday night...
I think I`m gonna optimize my point cloud not adjusting camera/lens parameters but only changing camera position/orientation.
I guess my calibration file is pretty consistent and accurate (even I used different focus distances from calibration project). Camera positions on the contrary could be wrong of 10/15cm sometimes...
What happens if I would optimize my point cloud using fix precalibrated option anf GCP coordinates (accuracy within 2cm)?
Does Agisoft change always camera positions coordinates or even GCP ones?
Shall I untick probably the precalibrated configuration and using only GCP coordinates?
How shall I use gradual selection to delete wrong points?
Usually I used just reprojection error set at 1 and then optimized my point cloud until in "show info" my chunck appears having reprojection errors smaller than 1...
Thanks for your help!
Davide

nadar

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Workflow with calibrated camera
« Reply #5 on: May 20, 2015, 05:49:23 PM »
Are you sure the calibration parameters obtained from Photomodeller are the same than those used by Photoscan ? Conversion can be really problematic, as they don't use the same parameter names, the same units (sometimes mm, sometimes pixels, etc. ) Be careful also with center offset value . Some are measured from the theoretical center, some from th upper left corner. Of course if you give wrong values, the result will be wrong.

piste

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Workflow with calibrated camera
« Reply #6 on: May 21, 2015, 02:20:38 AM »
Hi Nadar...
I did a bit of research before converting my camera parameters from Photomodeler to .xml (Photoscan).

According to this post (http://www.agisoft.com/forum/index.php?topic=2673.0) shouldn`t be so difficult.

Furthermore it was just Alexey to provide the answer...

Quote
You can use Convert option in Agisoft Lens tools menu.

In the opened dialog choose Photomodeler Type and then input all parameters manually according to the calibration results in the units specified in the dialog. Then click OK and you'll get the calibration report that you can export in PhotoScan XML format.

That`s exactly the procedure I followed...

Hopefully it`s correct.

So these questions are still to be answered:

 
Quote
What happens if I would optimize my point cloud using fix precalibrated option anf GCP coordinates (accuracy within 2cm)?
Does Agisoft change always camera positions coordinates or even GCP ones?
Shall I untick probably the precalibrated configuration and using only GCP coordinates?
How shall I use gradual selection to delete wrong points?
Usually I used just reprojection error set at 1 and then optimized my point cloud until in "show info" my chunck appears having reprojection errors smaller than 1...
Thanks for your help!

Thanks for any help!

Davide
« Last Edit: May 23, 2015, 06:34:14 AM by piste »

piste

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Workflow with calibrated camera
« Reply #7 on: May 23, 2015, 06:43:06 AM »
Any new suggestion??
Come on guys... ;)
I`d like to discuss with ones of you who have already experience in surveys using a calibrated system (procedure a bit different from usual Agisoft tutorials...).
Thank you!

bigben

  • Sr. Member
  • ****
  • Posts: 406
    • View Profile
Re: Workflow with calibrated camera
« Reply #8 on: May 24, 2015, 03:33:50 AM »
I don't have experience with working with known camera positions but one thing I  would try is letting Photoscan optimise the lens parameters and if the result is an accurate alignment then compare the lens parameters to your calibrated values.  Compare the absolute values, ratios between them (k1:k2:k3 for each) and whether they're positive or negative.  If either are remarkably different I'd do a calibration either using Agisoft lens or test your own calibration scene in Photoscan.... or just do quick calibration with Agisoft lens for comparison.

I'm guessing that the values for XYZ, yaw, pitch, roll that become available when you enable camera correction in the reference settings are the limits for corrections.

nadar

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Workflow with calibrated camera
« Reply #9 on: May 27, 2015, 11:48:04 PM »
I would say that from a theoretical point of view, fixed camera parameters seems better:

optimisation will try to adjust external orientation parameter (camear position and camera orientation angles) AND internal orientation (= geometric definition of the camera) to get the best fit between tie points.
If you are sure about the values of your internal orientation (i.e. the camera calibration parameters), I think you should rather keep these fixed and leave the program play only with external orientation. You may obtain worse results in terms of residuals, but will not introduce "strange" camera geometry.
Moreover, I found sometimes problems processing multiple chunks acquired with the same camera: optimised camera calibration parameters are not exactly the same, and I guess this is not good for chunk alignment.

Leica's LPS has an interesting approach: you can define an allowed range of settings for each parameter. For intance, you can accept 2% of "variation" in focal length, not more, 5% in decentering, etc...
I know there are also "sensibility" settings in Photoscan, but I never figured their meaning... Maybe somebody could help ?

piste

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Workflow with calibrated camera
« Reply #10 on: June 03, 2015, 07:43:37 AM »
Hi Bigben and Nadar...
sorry for the delay but I was traveling back from United States to Australia...

Quote
If you are sure about the values of your internal orientation (i.e. the camera calibration parameters), I think you should rather keep these fixed and leave the program play only with external orientation. You may obtain worse results in terms of residuals, but will not introduce "strange" camera geometry.
Moreover, I found sometimes problems processing multiple chunks acquired with the same camera: optimised camera calibration parameters are not exactly the same, and I guess this is not good for chunk alignment.

I think this is exactly the point!
Especially for my study case...
I`m trying to build a 3D model of both rims of a 500 meters deep gorge.
I have camera position locations and GCP right to the edge, but nothing (obviously) on the rockwall.
So if I let Photoscan optimize my pointcloud adjusting camera parameters I could affect it with undesired distortions...
More over, aligning different chunks together could introduce even other problems.
The precision of my coordinates has cm accuracy but I already checked and Photoscan doesn`t seem to change them too much.

I didn't know there was a "sensibility" function in Photoscan.
Would be interesting to get new help by somebody else who`s already used it in the past...

P.S.: I`m gonna show you few screenshots of my final models when I`ll finish aligning and process them.
Thanks

Davide

David Cockey

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: Workflow with calibrated camera
« Reply #11 on: June 07, 2015, 05:56:26 AM »
Potential reasons the earlier calibration may not be exactly correct for the project photos:

1)  Lens was focused at a much closer distance for the calibration photos than for the project photos. The difference in focusing means lens elements moved relative to each other and/or the sensor. The effective focal length may be slightly different and the distortion may be slightly different.

2)  If the lens has Image Stabilization was IS turned off for both sets of photos? Even if IS was turned off for both sets of photos were the IS elements in exactly the same position for both sets of photos. IS works by the IS elements moving to shift the image on the sensor to counteract camera movement. Unless the elements are in exactly the same position the image will be shifted slightly.

3) Temperature differences might cause lens elements to move slightly.