Forum

Author Topic: Updating project with CalCam info - no error improvement?  (Read 9729 times)

aggieair

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Updating project with CalCam info - no error improvement?
« on: August 08, 2014, 11:11:21 PM »
I would love some help.  I don’t know if I’m doing this process correctly.  The posts I found on camera calibration are not painting the full picture for me.

I completed an Agisoft aerial project with 6 known marker points (aerial targets).  I did not adjust any camera information and let everything go to the default.  (Somewhere I read about playing with these settings to improve results.  I did not do this.)

My errors are:  0.021789 (m), 0.238 (pixel). Photos below.

Then, I wanted to compare the same project but using known camera calibration file (opposed from staring over where markers would not be exactly the same due to human error).  I made a copy of the project.

I used RapidCal (updated CalCam version) to calibrate our cameras.  I imported this *.cal file into AgisoftLens which generated an xml file.  I imported this xml file in my copy project, reran the optimization (HERE the error did not change) and went through the steps again to get a mosaic. Checked to see the camera information stayed the same and it did.

Should I expect a change?  I was surprised that none of the error changes in the slightest.

Did I add my own camera information correctly (uploading xml file generated from AgisoftLens)? 

Below are the camera calibration windows one from the default and the other using the RapidCal/CalCam data.


aggieair

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #1 on: August 08, 2014, 11:39:39 PM »
We are using a Canon S95 camera for NIR and RGB, with a UAV flown at 600 m AGL.  Calibration is done in-house with a dot wall.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14816
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #2 on: August 09, 2014, 12:11:03 PM »
Hello aggieair,

You need to align photos with the input camera calibration parameters. Changing initial values after the alignment is finished would not have any effect. Also note that you can fix camera calibration, in this case PhotoScan will not refine the calibration.

Also I've noticed that you have input sensor size in mm instead of pixel size in mm. It doesn't affect anything as long as Precalibrated option is selected, but in Auto mode the initial values estimation will be incorrect.
Best regards,
Alexey Pasumansky,
Agisoft LLC

aggieair

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #3 on: August 20, 2014, 06:56:30 PM »
Hello Alexey,

Thnk you for the reply!  I was hoping you would have advice.

I changed my sensor info to be in pixel size (mm) for the precalibration option.

I reran the optimization and went through all the steps again.  While my error is still close to before, it seems like the detailed camera calibration info did not make much of a difference for this particular project? 

BEFORE:  Auto errors are:                 0.021789 (m), 0.238 (pixel)
AFTER:  Precalibrated errors are:     0.022320 (m), 0.239 (pixel)


Did I do this correctly?  Can you advise on that?

olihar

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #4 on: August 21, 2014, 01:28:16 PM »
I think what you are missing is, "you need to run alignment again"

Start from the beginning, add calibration info before running alignment.
« Last Edit: August 21, 2014, 09:02:29 PM by olihar »

David Cockey

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #5 on: August 21, 2014, 06:40:53 PM »
Why do you think an external calibration should improve the results compared to the calibration PhotoScan does?

olihar

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #6 on: August 21, 2014, 09:02:07 PM »
because when you assign calibration on your own you have to run alignment again, simple isn't it?

David Cockey

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #7 on: August 21, 2014, 09:40:37 PM »
My question above was intended for aggieair, the original poster.

aggieair, why do you think an external calibration should improve the results compared to the calibration PhotoScan does?

aggieair

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #8 on: August 24, 2014, 04:23:20 AM »
Everyone - yes, I reran the optimization, then alignment, then point cloud, then mesh and texture as you can see in my comment:

"I reran the optimization and went through all the steps again"

I am assuming using the known camera's interior orientation parameters would improve the results since you are now working with known variables.  No guessing.  From use in other software usage (ie. EnsoMosaic), when your camera calibration results are not their best (perhaps subpar camera calibration results are different than guessing results?), it affects the end product from experience.  I am assuming more known info would improve things.

David Cockey

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #9 on: August 24, 2014, 04:36:55 AM »
PhotoScan solves for the camera calibration parameters as part of the "bundle adjustment" process when aligning the photos (unless "Fix calibration" is checked). It finds the best set of camera calibration parameters for the photos used in the project. The initial settings in PhotoScan are only the starting point for the iterative process of solving for the best set of parameters.

aggieair

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #10 on: August 25, 2014, 10:21:50 PM »
"The initial settings in PhotoScan are only the starting point for the iterative process of solving for the best set of parameters."

So theoretically the parameters could be more refined with lower errors as a result?  Where can I find the instructions for these refinement steps for the rest of the iterative process?  Any manuals on this? 

Is it something like what is mentioned in this post from ju523m?
http://www.agisoft.ru/forum/index.php?topic=930.0

I guess I am confused on a) how to refine Agisoft's camera parameters, and b) which I am to use - our own calibrated camera parameters or let Agisoft do the refining.

It seems refining Agisoft's camera parameters should only get better (can't get worse than the initial, right?), so if the initial guess is already better than our known camera parameters, it seems I should go the refinement route, if I can learn the steps.  Or would it really be a project by project basis? 
« Last Edit: August 25, 2014, 10:25:09 PM by aggieair »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14816
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #11 on: August 26, 2014, 03:46:47 PM »
Hello aggieair,

I think the main difference of workflow with and without the accurate calibration information could be described by specifying the main steps of these operations:

For the project without pre-calibrated cameras:
- add images,
- align photos,
- place markers,
- optimize camera alignment.

For project with camera calibration information:
- add photos,
- open Camera Calibration dialog,
- import or input calibration data to Initial tab,
- fix calibration if you do not want these values to be refined during the processing (assuming that calibration is accurate, it seems strange to refine the parameters additionally),
- align photos,
- place markers,
- optimize camera alignment.

If the input initial values are totally incorrect and are far from the true values the alignment results will be surely affected.
Best regards,
Alexey Pasumansky,
Agisoft LLC

aggieair

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #12 on: August 27, 2014, 08:32:34 PM »
Thank you for the outlines, Alexey.

Any info, manuals, links, etc. about the iterative camera calibration refinement process?  I'd like to be able to do comparisons.

Do you suggest always using the iterative process when using Agisoft's camera guessing parameters?  Or use the camera info if it is already known?  Or whatever makes the best results?
« Last Edit: August 28, 2014, 01:12:31 AM by aggieair »

aggieair

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #13 on: September 03, 2014, 10:55:42 PM »
Can anyone provide some steps on the iterative camera parameters process that is mentioned in this post?  I would like to try it.

aggieair

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Updating project with CalCam info - no error improvement?
« Reply #14 on: September 10, 2014, 12:23:59 AM »
Is there any information out there regarding the iterative process for the camera parameters?  So far I am only going with the initial guessing (opposed to using my known camera parameters).  But if they can be refined even further, I would like to understand the process.

Thanks!