Forum

Author Topic: Manual convertion of camera from PhotoModeler to PhotoScan  (Read 20508 times)

jseinturier

  • Newbie
  • *
  • Posts: 2
    • View Profile
Manual convertion of camera from PhotoModeler to PhotoScan
« on: July 30, 2014, 09:23:27 AM »
Hello,

I'm a researcher that work on a photogrammetry platform developped for specific purpose (underwater exploration, ...) and i use for a time AgiSoft Photoscan for many time now.

The specific platform that i use has to deal with Agisoft Photoscan and has to be able to import / export data from / to your software.

My problem is that the camera model we use in our platform is the PhotoModeler model and i have to export it within Agisoft Photoscan model.

I know that the Agi Lens software can import a PhotoModeler camera and convert it to Photoscan Camera calibration. However, i have to make this conversion inside my platform and i can't use AgiLens at his time.

So here is my (pragmatic) question: How to pass from a photomodeler camera to a photoscan camera calibration ?

Here is one example:

Photomodeler parameters:
  • PMwp Image width, pixel: 1936
  • PMhp Image height, pixel: 1456
  • PMfocal Focal length, mm: 28.7486
  • PMfw Format width, mm: 36.1885
  • PMfh Format height, mm: 24.112
  • PMppx Principal point X, mm: 17.9828
  • PMppy Principal point Y, mm: 11.4851
  • PMK1 Radial distortion K1: 0.0001246
  • PMK2 Radial distortion K2: -1.909e-07
  • PMK3 Radial distortion K3: 1.172e-10
  • PMP1 Decentering distortion P1: -2.766e-06
  • PMP2 Decentering distortion P2: -1.535e-05

Agi Lens converted camera parameters:
  • PSwp Image Width: 1936
  • PShp Image height: 1456
  • PSfx Focal length (x): 1537.92
  • PSfy Focal length (y): 1735.91
  • PScx Principal point (x): 962.039
  • PScy Principal point (y): 693.533
  • PSskew Skew: 2.01075e-05
  • PSK1 Radial K1: -0.101602
  • PSK2 Radial K2: 0.147258
  • PSK3 Radial K3: -0.112404
  • PSP1 Tangential P1: 0.000401217
  • PSP2 Tangential P2: 7.19026e-05

I know at this time how to convert some data from photomodeler to photoscan:

Focal length
PSfx = PMfocal x PMwp / PMfw
PSfy = PMfocal x PMhp / PMfh

Principal point
PScx = PMppx x PMwp / PMfw
PScyPMppy x PMhp / PMfh

However, i wanted to know how to determine the skew (PSskew) parameter from photomodeler values and how to convert distortion.

Can you please help me ?

Thanks,

Julien
« Last Edit: July 30, 2014, 09:50:59 AM by jseinturier »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15138
    • View Profile
Re: Manual convertion of camera from PhotoModeler to PhotoScan
« Reply #1 on: July 30, 2014, 09:52:10 AM »
Hello jseinturier,

You can convert Photomodeler calibration data using Agisoft Lens and save it in .xml format that is accepted by PhotoScan (use Tools -> Camera Calibration -> Load option in PhotoScan to import calibration from .xml format). But actually, direct calibration import from Photomodeler .ini calibration file is possible using the same option, just choose proper input format.
Best regards,
Alexey Pasumansky,
Agisoft LLC

jseinturier

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Manual convertion of camera from PhotoModeler to PhotoScan
« Reply #2 on: July 30, 2014, 09:58:10 AM »
Hi,

I know that i can do such a conversion using Agi Lens, but for material constraints i've no access to the software when i have to export the data, so i need to convert the camera calibration inside my own platform, that the reason why i ask you how to make the conversion by myself.

If i'm not able to do that, the Agisoft Photoscan software will be useless for us and we will have to look for other software...

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15138
    • View Profile
Re: Manual convertion of camera from PhotoModeler to PhotoScan
« Reply #3 on: July 31, 2014, 02:02:37 PM »
Hello jseinturier,

Unfortunately, there are no conversion formulas as both Lens and PhotoScan recalculate calibration parameters numerically and not analytically. 
Best regards,
Alexey Pasumansky,
Agisoft LLC

jjpaul

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Manual convertion of camera from PhotoModeler to PhotoScan
« Reply #4 on: November 10, 2014, 01:57:31 PM »
Hello Alexey, I have calibrated my camera with Photomodeler Scanner and it doesn't write the .ini file, only .txt Status Report Tree from .pmr file. I have calibrated too with Lens, but units are different and I cannot compare. How can I transform the values among the two programs, Photomodeler to Lens and Lens to Photomodeler. Thank you for your support.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15138
    • View Profile
Re: Manual convertion of camera from PhotoModeler to PhotoScan
« Reply #5 on: November 10, 2014, 02:00:58 PM »
Hello jjpaul,

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.
Best regards,
Alexey Pasumansky,
Agisoft LLC

jjpaul

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Manual convertion of camera from PhotoModeler to PhotoScan
« Reply #6 on: November 10, 2014, 02:21:48 PM »
Thank you for asnwer quickly.
It would be possible that Lens gives the calibration parameters in the same units as PhotoModeler?
I use a free program for rectifying images called SimPhoto (http://lfgm.fsv.cvut.cz/~hodac/simphoto/index_en.html)
This program ask for the distortion parameter, k1, k2, k3, p1, p2, but not in the same units as Lens, and I cannot use it.
Thank you again.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15138
    • View Profile
Re: Manual convertion of camera from PhotoModeler to PhotoScan
« Reply #7 on: November 10, 2014, 02:24:18 PM »
Hello jjpaul,

Currently Agisoft Lens performs one-way conversion to PhotoScan XML format, however, you can use PhotoScan itself to save the calibration results in Photomodeler format. For this case use Tools menu-> Camera Calibration dialog (in PhotoScan), manually input values or load XML file, then use Save button and choose one of the supported formats.
Best regards,
Alexey Pasumansky,
Agisoft LLC