Forum

Author Topic: Lens correction (aerial photography)  (Read 23883 times)

George

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Lens correction (aerial photography)
« on: May 23, 2013, 10:41:45 AM »
What do you think about using this for correction of a lens distortions?

http://www.epaperpress.com/ptlens/index.html

Worth using?

Wishgranter

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
    • Museum of Historic Buildings
Re: Lens correction (aerial photography)
« Reply #1 on: May 23, 2013, 02:19:14 PM »
Hello George, Pscan have a automatic lens corrections built in. whats is interesting is the possibility to test on wide-fisheye lenses......
Every photogrammetry sw has a corection of lenses inside, without it cannot process data with desired degree of precision. im have tested few times undistortion on photographs, but its better to use built in model for best results. few people say they get better results when undisorted, but believe me, if this was the way it wold be used on larger scale. everyone who know a lot about it wil say use sw built in to do it.

Im think few people from here could say more on this stuff.....

----------------
www.mhb.sk

George

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Lens correction (aerial photography)
« Reply #2 on: May 24, 2013, 08:26:06 AM »
In case of Pscan inbuilt means automatic or semiautomatic ...
or how do you apply it?

Wishgranter

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
    • Museum of Historic Buildings
Re: Lens correction (aerial photography)
« Reply #3 on: May 24, 2013, 12:11:45 PM »
its fully automatic. can see results when use TOOLS-EXPORT-UNDISTORT PHOTOS....
----------------
www.mhb.sk

gEEvEE

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Lens correction (aerial photography)
« Reply #4 on: May 24, 2013, 01:56:35 PM »
Hi George,

just some theory on lens distortion.

In photogrammetry and computer vision, the geometry of perspective projection is used to model the formation of an image mathematically. In the field of photogrammetry, this is expressed by the collinearity equation which states that the object point, the camera’s projection centre and the image point are located on a straight line and the image is formed on an exact plane. Lens distortions (radial and decentring), atmospheric effects (mainly refraction) and a non-planar image sensor are factors which prevent this. Since digital image sensors are by default treated as perfectly planar surfaces and refraction is a very specific topic that is only of major importance when imaging from rather high altitudes and off-nadir angles, only lens distortions are generally considered.

In the case of an ideal camera, which would be a perfect central projection system in which projection implies a transformation of a higher-dimensional 3D object space into a lower-dimensional 2D image space, the lens imaging system would be geometrically distortionless. The mathematical parameters describing this ideal situation are the principal distance and the principal point (forming the so-called interior/inner orientation). However, since optical distortions are always present in real cameras, the image points are imaged slightly off of the location they should be at according to the central projection. To metrically work with images, every image point must be reconstructed to its location according to this ideal projective camera. Therefore, the deviations from the perfect situation are modelled by suitable distortion parameters, which complete the interior orientation. All the parameters of the interior orientation (also called camera intrinsics) are determined by a geometric camera calibration procedure. After this geometric camera calibration, all parameters that allow for the building of a model that can reconstruct all image points on their ideal position are obtained, thereby fulfilling the basic assumption used in the collinearity condition.

In a Structure from Motion approach such as PhotoScan, a self-calibration/auto-calibration is run to automatically define the camera’s interior orientation. The latter is stored for each image in the intrinsic parameter matrix K. Since PhotoScan can solve for four radial lens distortion parameters (k1, k2, k3, k4) and two decentring lens distortion parameters (p1, p2), the total lens distortion can be modelled very accurately and much better than most tools such as PTlens. In addition to the abovementioned parameters, several other camera characteristics can be calibrated such as affinity in the image plane, consisting of aspect ratio (or squeeze) and skew (or shear). However, zero skew (i.e. perpendicular axis) and a unit aspect ratio (i.e. photodetector width to height equals 1) can be assumed for any digital frame camera. The latter explains why I would never ask PhotoScan to optimise for aspect and skew.

Hope this provides some insight.
Geert


George

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Lens correction (aerial photography)
« Reply #5 on: May 24, 2013, 02:37:22 PM »
Wishgranter hi,
in which cases you'd use that function?
GR

Wishgranter

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
    • Museum of Historic Buildings
Re: Lens correction (aerial photography)
« Reply #6 on: May 24, 2013, 02:47:26 PM »
Hello George, im have used it for testing on some not properly photographed models, with this we could create model out of it, but this was just for testing. because the eror produced normal way could not go winth internal checks on precision in pscan.

Images were blurred ( a lot on some ) and not properly shooted... but im never using it for creating projects, becasue as GeeVee has wroten its some of the basic how photogrammetry work.... for the GIS im would NOT use any external sw for this.....
----------------
www.mhb.sk

George

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Lens correction (aerial photography)
« Reply #7 on: May 24, 2013, 03:01:58 PM »
Geert hi,
thanks! Really valuable.
From the practical point of view what is your choice to employ Undistort?
What about oblique images for example.
Does the problem anyhow concern with ever oblique edges of the final mosaic?
GR

gEEvEE

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Lens correction (aerial photography)
« Reply #8 on: May 25, 2013, 01:51:20 AM »
Hi George,

I never use undistort. Undistort is a function which uses the interior parameters calculated by SFM (Structure from Motion) to create a new photograph that is free of lens distortion. It can, for instance, be used to map something when the image was taken in a vertical way and no relief was present. However, besides the lens distortions, geometric errors are also induced by the topographical relief and the tilt of the camera axis.

You have to imagine that a camera is placed at a certain location in space (in the air or on the ground) and is pointed in a certain direction. The location defines the projection centre O with three coordinates (X, Y, Z) and the direction is defined by three rotation angles roll, pitch and yaw (omega, phi, kappa). Together, these six parameters establish the so-called exterior/outer orientation. Other terms for that are camera extrinsics or simply pose. When including the principal distance (which is part of the interior orientation), the position of the image is unequivocally defined. During a vertical photography flight, omega and phi are near to zero. When they equal zero, the result is a perfect nadir/vertical photo that does not need any correction for tilt displacement. The more tilted the photographic axis with respect to the ground surface, the more corrections need to be dialled in. The projective transformation of a tilted aerial image to a horizontal plane to remove these tilt displacements (and thus scale differences) is called (planar) rectification.

However, any (even tilt-free) aerial photograph will contain displacements due to topographic relief and other height differences. Thus any feature lying below or above the horizontal reference surface will be misplaced in a planar rectification due to the central perspective of the air photo and the resulting relief displacements.

The geometric correction of a photo aims to compensate for most of these deformations. The result of such a correction must be an image with a geometric integrity like a map, i.e. an orthogonal projection to the horizontal reference plane. Just as rectification denotes the process of removing tilt from a photograph, relief displacements and other geometrical deformations (such as optical distortions) can be corrected through the process of orthorectification or differential rectification .

PhotoScan enables the production of true orthophotographs, since it computes the internal camera parameters and a digital surface model, which provides data on the terrain differences. Since also the exterior orientation of the cameras is calculated, all variables are known to compute an orthophoto. So, no need to undistort the photographs in a separate step. You can work with your original, distorted images since Photoscan bases all its calculations on them.
In a few weeks, a quite extensive book chapter should be published in which I detail all the parameters influencing an (aerial) image and how they can be taken into account using a standard photogrammetric and Structure from motion approach. As soon as I receive the final version, I can post it here if you like.

What do you mean by: "Does the problem anyhow concern with ever oblique edges of the final mosaic?".

Greetings,
Geert
« Last Edit: May 25, 2013, 01:54:05 AM by gEEvEE »

jedfrechette

  • Full Member
  • ***
  • Posts: 134
  • Lidar Guys
    • View Profile
    • www.lidarguys.com
Re: Lens correction (aerial photography)
« Reply #9 on: May 25, 2013, 03:15:37 AM »
Probably the most common use for undistorted images is when you want to use them with an idealized virtual camera/projector, i.e. in a CG rather than remote sensing or GIS type program.

For some more background on camera models and calibration you may want to read the relevant chapter in Learning OpenCV as PhotoScan uses the same pinhole camera model. The rest of the OpenCV book is getting a bit long in the tooth but the camera calibration chapter is still relevant. By chance it is also the sample chapter that O'Reilly provides online:

http://cdn.oreilly.com/books/9780596516130/ch11.pdf
Jed

George

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Lens correction (aerial photography)
« Reply #10 on: May 28, 2013, 11:12:41 AM »
Geert, hi!
Sure! I think we all want that you share the book.
I meant ... what could be done to orthorectify edges, which tend to appear oblique in a mosaic?
George

gEEvEE

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Lens correction (aerial photography)
« Reply #11 on: May 29, 2013, 01:55:46 AM »
Well, generally edges are very poor as the 3D geometry can not be computed well because there are no images covering the edge from all directions (otherwise, it would not be the edge of the mosaic of course). Since one needs a good 3D model for proper orthorectification, you can just cut the edges off as they will not contain good enough data for orthorectification.

Wishgranter

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
    • Museum of Historic Buildings
----------------
www.mhb.sk