Forum

Author Topic: Exporting Agisoft aligned photos to Inpho  (Read 13518 times)

Paulo

  • Hero Member
  • *****
  • Posts: 1647
    • View Profile
Exporting Agisoft aligned photos to Inpho
« on: August 21, 2013, 06:08:19 AM »
I am trying to export the results of photo alignment  to Inpho  for further stereo restitution...

However whether I use the new export function for Inpho or export undistorted photos and then focal lenght=(fx+Fy)/2 without any distorsion parameters, when i look at the models they have a lot of y parallax and restitution cannot be performed....

it seems the camera model of Agisoft is not correctly represented...

Anyne has any ideas on this issue?
Best Regards,
Paul Pelletier,
Surveyor

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15749
    • View Profile
Re: Exporting Agisoft aligned photos to Inpho
« Reply #1 on: August 21, 2013, 05:00:21 PM »
Hello pap1956@gmail.com,

In some versions of Inpho projects saved in Inpho format could be opened incorrectly.

Please try to follow this instruction: http://downloads.agisoft.ru/pdf/ps-to-inpho.pdf and inform us if import the data to Inpho was successful.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Paulo

  • Hero Member
  • *****
  • Posts: 1647
    • View Profile
Re: Exporting Agisoft aligned photos to Inpho
« Reply #2 on: August 21, 2013, 08:39:11 PM »
Alexei,

I seem to have a better solution when I use export Undistort photos... but without center principal point option

In inpho for focal length i use (fx+fy)/2*pixel size
for principal point                     PPx=(Cx-sensorwidth/2)*pixel size
                                                PPy=-(Cy-sensorheight/2)*pixel size

In inpho there is very little parallax with this way...

Thanks,
Best Regards,
Paul Pelletier,
Surveyor

macsurveyr

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Exporting Agisoft aligned photos to Inpho
« Reply #3 on: May 06, 2014, 12:07:34 AM »
Alexey,

Has the export to Inpho been revisited lately?

I exported an Inpho project and noticed that the camera information seemed incorrect. Both for each image and also for the camera definition at the end.

The focal length is exported as the original EXIF value not the calibrated focal length. So, I entered the calibrated focal length into the camera calibration dialog box and reexported. The new value was indeed exported but things are still not correct.

Here is one photo and the camera definition from the original export

$PHOTO
  $PHOTO_NUM : pr0909_50mm_0778.TIF
  $PHOTO_FILE : G:/PowderRiver2009/APC/pr0909_50mm_0778.TIF
  $CAMERA_ID : Canon_EOS-1Ds_Mark_II_(50_mm)
  $TERRAIN_HEIGHT : 1282.3846198138667000
  $PIXEL_SIZE : 0.0069918047717751
  $SCAN_POS : 0
  $IO_PARS : 2 2
  $IO_STAT : manual
  $EXT_ORI : 08:20:46 05/05/2014
        50.0000000000000000    405615.6194925598100000   4863478.9887055010000000       1514.3143030865913000
      0.8310341536382675      -0.5444507272856713      0.1138228493969121
      0.5558503132780518      0.8054316153965812      -0.2056947790984157
      0.0203141506202012      0.2342078531513363      0.9719742881408036
$END
$CAMERA
  $TYPE : Canon_EOS-1Ds_Mark_II_(50_mm)
  $DATE : 08:20:46 05/05/2014
  $BRAND : Custom
  $KIND : CCDFrame
  $CCD_INTERIOR_ORIENTATION :
     143.0297329511802800       -0.0000000000000000    2509.2457364247275000
       0.0000000000    -143.0194439471396200    1700.4109677756908000
  $CCD_COLUMNS : 4992
  $CCD_ROWS : 3328
  $PIXEL_REFERENCE : TopLeftTopLeft
  $FOCAL_LENGTH :    50.0000000000000000
  $PRINCIPAL_POINT_PPA :     0.000000     0.000000
  $DISTORTION_TYPE :  Polynomial
  $RADIAL_COEFFS :
                      0.0000000000000000             0.0000304526480109                  0.0000000361957312                  -0.0000000000592217
                      0.0000000000000709             0.0000000000000000                  0.0000000000000000                  0.0000000000000000
  $DECENTRE_COEFFS :
                      0.0000099585304794             0.0000153221698427                  0.0000000000000000                  0.0000000000000000
  $GPS_ANTENNA_OFFSET :     0.000000     0.000000     0.000000
  $CAMERA_MOUNT_ROTATION :     0.000000
$END


Here is the second export - after only entering the calibrated focal length.


$PHOTO
  $PHOTO_NUM : pr0909_50mm_0778.TIF
  $PHOTO_FILE : G:/PowderRiver2009/APC/pr0909_50mm_0778.TIF
  $CAMERA_ID : Canon_EOS-1Ds_Mark_II_(50_mm)
  $TERRAIN_HEIGHT : 1282.3846198138667000
  $PIXEL_SIZE : 0.0072005638580535
  $SCAN_POS : 0
  $IO_PARS : 2 2
  $IO_STAT : manual
  $EXT_ORI : 11:46:32 05/05/2014
        51.4928841199999990    405615.6194925598100000   4863478.9887055010000000       1514.3143030865913000
      0.8310341536382678      -0.5444507272856710      0.1138228493969121
      0.5558503132780515      0.8054316153965814      -0.2056947790984157
      0.0203141506202011      0.2342078531513363      0.9719742881408036
$END
$CAMERA
  $TYPE : Canon_EOS-1Ds_Mark_II_(50_mm)
  $DATE : 11:46:32 05/05/2014
  $BRAND : Custom
  $KIND : CCDFrame
  $CCD_INTERIOR_ORIENTATION :
     138.8830082015420300       -0.0000000000000000    2509.2457364247275000
       0.0000000000    -138.8730174967908200    1700.4109677756908000
  $CCD_COLUMNS : 4992
  $CCD_ROWS : 3328
  $PIXEL_REFERENCE : TopLeftTopLeft
  $FOCAL_LENGTH :    51.4928841199999990
  $PRINCIPAL_POINT_PPA :     0.000000     0.000000
  $DISTORTION_TYPE :  Polynomial
  $RADIAL_COEFFS :
                      0.0000000000000000             0.0000287124754340                  0.0000000321772187                  -0.0000000000496384
                      0.0000000000000561             0.0000000000000000                  0.0000000000000000                  0.0000000000000000
  $DECENTRE_COEFFS :
                      0.0000096698122950             0.0000148779487735                  0.0000000000000000                  0.0000000000000000
  $GPS_ANTENNA_OFFSET :     0.000000     0.000000     0.000000
  $CAMERA_MOUNT_ROTATION :     0.000000
$END

FYI

Both exports had virtually the same info in the console - here it is

lm optimize: xxxxx-----------x-x----------- 0.077662 -> 0.00225481
Calibration converted, mean error = 0.442852 pix, max error = 0.884545 pix


I do not have Inpho, but can import an Inpho project into Stereo Analyst and with both projects, there is quite a bit of parallax away from the center of the model - actually worse with the calibrated focal length entered.

Tom