# Forum

### Author Topic: Using photoscan's orientation results in Imagine/Leica Photogrammetry suite  (Read 12716 times)

• Full Member
• Posts: 130
##### Using photoscan's orientation results in Imagine/Leica Photogrammetry suite
« on: January 07, 2015, 01:18:16 AM »
I would like to use estimated values of camera positions and orientations defined in Photoscan (alignment + optimisation) in ERDAS Imagine Photogrammetry suite (aka LPS) , in order to digitize features in a stereoscopic environment (StereoAnalyst).
Inputs for LPS are image name (including complete path), X, Y, Z position values and omega, phi, kappa orientation values.
I tries using estimated values.
Import of XYZ is fine, but orientation doesn't work. I also tried through the export camera  tool (type omega-phi-kappa), but also unsuccessfully.

I interpret roll as omega, pitch as phi and yaw as kappa (please confirm if this is correct), but the convention used for these angles seems incorrect.
I suppose all angles coming from photoscan are in degree (?) but LPS can also use gons (grades) and radians.
The convention used in LPS is the right hand rule (see http://en.wikipedia.org/wiki/Right-hand_rule)according to this rule, if the plane is inclined on the right side, roll will be positive, etc.
A major concern is with yaw. LPS measures kappa (yaw) positive if you turn to the left direction, and negative to the right. I assume the ortgin (kappa=0) is the top of the photo (=no rotation). Is photoscan using the same convention, or a "geographic" orientation, where yaw is defined as the bearing (yaw=0 when the top of the image is towards north).
More confusing for me: in which order are these rotation applied ?

Then, I need to introduce the estimated camera calibration parameters.
Here also, LPS is quite confusing:
I need focal length (this one is easy) and x&y decentering offsets in mm, while photoscan reports these in pixels. I assume the offset is given by the difference between the actual center and the theoretical center (= Xsizs / 2).  It's easy to transform by multypling the offset in pixels by the pixel size, but I'm not sure about the direction (sign) of this parameter. Could somebody confirm if [Cx-(Xresolution/2)]*pixelsize corresponds to Xoffset of principal point, as requested in LPS

And now, the cherry on the cake:
I need "extended parameters", and LPS proposes 3 templates: ORIMA, Australis and SMAC
Australis seems the closest to what photoscan provides in calibration report (k1, k2, k3, p1, p2), but when I enter the estimated values, I only get garbage (works fine if I set all parameters to zero). I assume these are coefficients and don't use units and hence no transformation from pixels to microns or whatever.
LPS can also calibrate the camera using a set of radial distorsions values, but I don't see this type of info in photoscan reporting. Am I wrong ?

If somebody uses photoscan and LPS, I will really appreciate to understand how to share infos between these two packages that are potentially very complementary.

Thanks

#### StevenF

• Newbie
• Posts: 39
##### Re: Using photoscan's orientation results in Imagine/Leica Photogrammetry suite
« Reply #1 on: January 07, 2015, 08:49:19 PM »
I've imported orientation from PhotoScan into LPS to use StereoAnalyst and haven't had any problems. However, I was using a camera without distortion or pp offset parameters so it simplifies the process. I'll run through my process, but it doesn't seem much different from what you've tried so far.
1. In PhotoScan > Export Cameras as Omega Phi Kappa. Then edit the file to contain the full image path and column with a unique ID number.
2. Camera Calibration > Adjusted Tab> Save as Australis
3. Open Imagine and create a new Photogrammetric project
4. Model Setup> Model Category = Frame, Geometric Model = Digital Camera (or Frame if using scanned film)
5. Block Property Setup > Reference Coord = Same as the exported OPK file
6. Frame Specific Info > Rotation system = OPK, Angle = Degrees, Photo Direction = Z-axis, Flying height = rough average
7. New Camera... >
8. Camera Info > My camera didn't have pp offset or distortion parameters so I didn't find it necessary to enter this info or use the Australis model, but in your case here's what I'd try:
a. Check use extended camera model and click edit extended parameters.
b. Enter parameters from exported Australis calibration.
c. Save the camera model
9. Import Exterior Orientation info from the edited OPK file. I actually had a lot of problems with LPS crashing during this step, but eventually figured out a sequence that wouldn't crash it.
10.  Wait for image loading and building pyramids.
11. Click Interior Orientation.
a. Interior orientation tab> set pixel size in microns and apply to all frames
b.  Exterior orientation tab > set status to Fixed for all and apply status to all active frames
12. Open StereoAnalyst and view a pair of images

If that process doesn't work then there could be some difference between how the PhotoScan exports the camera calibration parameters and how they're interpreted by LPS. You may want to avoid using the extended parameters and just use the principal point offsets and k1, k2, and k3 coefficients on the radial distortion tab. Considering my project worked, I doubt there's a difference in interpreting the rotational angles (opk) between the programs.

• Full Member
• Posts: 130
##### Re: Using photoscan's orientation results in Imagine/Leica Photogrammetry suite
« Reply #2 on: January 08, 2015, 08:08:19 PM »
Thanks a lot StevenF for your precise and highly valuable comments.
I followed your instruction and it worked.
I think what I was missing was step 11b, to setup all parameters as "fixed".

BTW, export/import of camera calibration parameters (using Australis template) also worked fine.

At first sight, I may have a problem with elevations, because readings done in Photoscan cloud are not the same than readings done in StereoAnalyst. I will process another project for which I have more precise GCPs and will come back to comment.

Do you think possible (or recommended) to run an additional block adjustment/ aerotriangiulation on the initial position/orientation values obtained from Photoscan ? (of course I will then change "fixed" to "initial"). From your experience, which software is the most efficient for aero triangulation: LPS or Photoscan ?

#### StevenF

• Newbie
• Posts: 39
##### Re: Using photoscan's orientation results in Imagine/Leica Photogrammetry suite
« Reply #3 on: January 09, 2015, 06:48:38 AM »
If your check point RMSE in PhotoScan is sufficiently low I wouldn't expect much improvement in LPS.
I get worse results for auto-tie points in LPS even with good starting orientation, so it requires more work to check the points and remove or fix erroneous ones. It's also more difficult to place GCP's in LPS. However there are some more options for how it arrives at a solution. You can adjust relative accuracy of different parameters and choose different solution methods, but I haven't experimented with these options much.

#### fsteiner

• Newbie
• Posts: 5
##### Re: Using photoscan's orientation results in Imagine/Leica Photogrammetry suite
« Reply #4 on: October 04, 2015, 07:04:48 PM »
Hejhej there,

I would like to compare LPS and PhotoScan calibration results. I need to correctly interpret the estimated camera calibration parameters. I assume the same as stated by nadar here:

Then, I need to introduce the estimated camera calibration parameters.
Here also, LPS is quite confusing:
I need focal length (this one is easy) and x&y decentering offsets in mm, while photoscan reports these in pixels. I assume the offset is given by the difference between the actual center and the theoretical center (= Xsizs / 2).  It's easy to transform by multypling the offset in pixels by the pixel size, but I'm not sure about the direction (sign) of this parameter. Could somebody confirm if [Cx-(Xresolution/2)]*pixelsize corresponds to Xoffset of principal point, as requested in LPS

But then, the sign is obviously the wrong way (in x and y direction). It could be because of a different calibration result, but I rather think, something is "upside down" (see attachment). Any ideas, what I did wrong? Couldn't find anything on the definition of +/- for LPS, PS is more clear I think.

best regards
- plitvicer

#### jmos

• Newbie
• Posts: 16
##### Re: Using photoscan's orientation results in Imagine/Leica Photogrammetry suite
« Reply #5 on: October 15, 2015, 08:41:25 AM »
Hi, just tried Agisoft for the first time and have been very impressed with the results.
Our goal was to produce Ortho mosaics and then view imagery in SAFA(Stereo Analyst for Arcgis)

I was amazed at how easy the process was, simply exported camera to Inpho project file, this imported directly into SAFA, should do the same with SAFI?
John

#### StevenF

• Newbie
• Posts: 39
##### Re: Using photoscan's orientation results in Imagine/Leica Photogrammetry suite
« Reply #6 on: November 07, 2015, 08:17:03 AM »
Hi jmos,
There may be some compatibility issues between how PhotoScan writes Inpho project files and how Imagine will read them. This is the case with another photogrammetry package, SURE, as you can see noted in this manual on the top of page 6. I haven't tried using Inpho project files and no longer have access to StereoAnalyst so I can't say for certain whether the Inpho files work correctly.

You may want to do a couple quick checks to see if the imported parameters are correct. One way to do this would be to import cameras by the method I specified above, then compare measurements and locations made with both methods. Another way would be to compare locations and measurements made with StereoAnalyst to GPS field measurements or measurements made in another orthomosaic covering the same area.

#### jmos

• Newbie
• Posts: 16
##### Re: Using photoscan's orientation results in Imagine/Leica Photogrammetry suite
« Reply #7 on: November 09, 2015, 09:58:38 AM »
Hi Steven, thanks for the advice.
Yes we have other data both ortho mosaic and vector to compare and outputs seem good.
Was interested to see what other users had experienced.
Impressed at the easy work flow.
Regards

#### soydum

• Newbie
• Posts: 4
##### Re: Using photoscan's orientation results in Imagine/Leica Photogrammetry suite
« Reply #8 on: October 06, 2018, 02:55:16 PM »

did u have any success in reading Z? I have same problem reading tie points z in Photoscan and comparing it to the LPS, they are the same at tie gcps, but getting worse in remote places.

Thanks a lot StevenF for your precise and highly valuable comments.
I followed your instruction and it worked.
I think what I was missing was step 11b, to setup all parameters as "fixed".

BTW, export/import of camera calibration parameters (using Australis template) also worked fine.

At first sight, I may have a problem with elevations, because readings done in Photoscan cloud are not the same than readings done in StereoAnalyst. I will process another project for which I have more precise GCPs and will come back to comment.

Do you think possible (or recommended) to run an additional block adjustment/ aerotriangiulation on the initial position/orientation values obtained from Photoscan ? (of course I will then change "fixed" to "initial"). From your experience, which software is the most efficient for aero triangulation: LPS or Photoscan ?