Agisoft Metashape
Agisoft Metashape => General => Topic started by: Rico on April 24, 2015, 11:37:27 AM
-
Hey there, im new with Photoscan and writing my thesis about it.
I was lookin around in the forum for a bit, but didnt find anything for pre calibration of Camera.
Did i get that right from this post of Alexey that there is no need to calibrate the camera at all, since Photoscan gets all the Cam-info from the EXIF. So no improvement of accuracy in measurment purposses??
6. Since the image EXIF contain focal length and sensor size there is no need to pre-calibrate camera.
Cheers Rico
-
We are never using camera calibration, and are getting excellent results. However, we are using really good lenses and correct for lens defects (distortion, chromatic abberation, vignetting) when converting the RAW files.
I can imagine that camera calibration is useful when using (for example) fisheye lenses or other lenses with a lot of distortion (some zoom lenses can also have very weird distortion patterns).
-
Without calibrated lens settings the lens distortion parameters are calculated as part of the image alignment step. In order for this calculation to arrive at an accurate result it requires a good spread of matching points between images. In some cases, this requirement is not completely satisfied due to inadequate overlap or areas with low/repetitive detail and the distortion parameters will be slightly off which will be partly compensated for by the camera positions being slightly off. A typical example of this is the bowed terrain and camera path that often results from aligning a single flight path of serial images. If you use calibrated settings then you remove the possibility of getting "inaccurate" distortion parameters being calculated, improving the calculation of camera positions in less than ideal situations.
-
okay thanks for the help :) :)
-
It seems the exif data is less important than you would think? Is it useful at all? Agisoft seems to do an amazing job calibrating during the alignment. Does the EXIF data help in any way?
-
Hello igor73,
PhotoScan uses image EXIF data for the initial step of autocalibration procedure. If the EXIF is missing PhotoScan uses the general guess (50mm focal length in 35mm equivalent), but if this guess is very different from the real values the alignment may fail or be incorrect.
-
Hello igor73,
PhotoScan uses image EXIF data for the initial step of autocalibration procedure. If the EXIF is missing PhotoScan uses the general guess (50mm focal length in 35mm equivalent), but if this guess is very different from the real values the alignment may fail or be incorrect.
How big is the influence of a small difference between EXIF value and real value? I am asking because lenses often have a slightly different real focal length than what manufacturers state (and list in the EXIF info) For example a 50mm lens might have a real focal length of 48mm or 52mm. Does this tiny difference matter?
-
Hello marcel,
Small difference for the initial step doesn't matter, as the values are to be adjusted.
-
Thanks for the answer, that is good to know!
Am I correct that when I use "Optimize Cameras" that it's basically doing the same calibration as Agisoft Lens? (Since the values are the same).
As an example of how much the real focal length can differ from the EXIF info: when I calculate the focal length for my 50mm lens based on the Agisoft Lens output, I come out at 53,7mm. Quite a difference! (not sure if I did the conversion to mm entirely correct).
-
it is correct, most lenses are defined with "common" lens parameters and in photography its not a problem, in photogrammetry and VFX it can cause "problems"
-
The process is essentially the same (optimising lens parameters and camera positions) but Agisoft Lens adds in some extra criteria via the target grid that help to (more) correctly arrive at the lens distortion parameters.
-
The process is essentially the same (optimising lens parameters and camera positions) but Agisoft Lens adds in some extra criteria via the target grid that help to (more) correctly arrive at the lens distortion parameters.
Could you explain what these extra criteria are?
Edit: also, how do you know it is more correct, because the Optimize Cameras function in Photoscan doesn't report any results?
-
I had to use the the lens calibration for my Ricoh GX100 and GX200 because info about the sensor size isn't included in their EXIF data. Models created from these cameras have a bowl shape if I don't use the lens calibration.
-
The optimisation process that occurs during image alignment doesn't have any info about the relative/absolute position of the points in the real world, just their positions in the images. Agisoft Lens uses a grid of squares as a target, so assuming that there is some pattern recognition going on to recognise the squares, then it knows that the distance between each of the corners is the same, and rows/columns of corners will have the same X/Y coordinates. This helps avoid lens parameters that would result in the "bowl" effect. GCPs perform the same function, although this doesn't help users of the standard version.
The bowl effect in turn is caused by the the optimisation process drifting towards incorrect values that provide a mathematically correct outcome. This is usually due to inadequate overlap of images (not just the amount, but the spread of overlap across the frame) In these cases, the fov, distortion parameters and camera orientations compensate for the deviations from the true values. The same thing happens with automated panorama stitching, although it's less critical in that application.
-
Thanks Bigben, that's interesting. I get what you mean with drifting to a mathematically correct solution, but I do wonder however how much difference there really is. There are a lot more points in the sparse cloud, and generally they are of much higher quality than photos of an LCD screen (where a recognizable detail might be 5 pixels wide + more DOF because of short distance).
I might try having the calibration target printed on a really big sheet of paper to see if that changes the results compared to the results from the LCD screen.
-
Having more points isn't really relevant compared to having real world reference points to align those to. In theory it shouldn't make any difference what size the reference target is. The other important thing is that the reference points chosen should occur across the field of view.
To do a similar approach in the Pro version you could specify a large grid of GCPs across a wall and use the standard align and optimise steps. The standard version doesn't use GCPs, making the lens calibration tool more practical for those users.
Advice to take multiple photographs of the same view at different rotation angles (e.g. http://culturalheritageimaging.org/Technologies/Photogrammetry/ (http://culturalheritageimaging.org/Technologies/Photogrammetry/)) is geared towards providing the image data that increases the likelihood of the optimisation process arriving at accurate values in the absence of calibrated values
-
I calibrate our cameras in-house using the big dot wall. I ran it both ways - with my camera info and letting Agisoft pick the interior orientation values. Entering the camera calibration file into an Agisoft project and it did not improve the error results. In fact, it was less accurate by 0.03 m (in the Error M and Error Pix columns). I didn't do an accuracy assessment in ArcGIS though. Letting Agisoft pick the interior orientation info was slightly better in the end.
The only time I'd use that camera calibration info is if I created my mosaic in EnsoMosaic which needs it.
Someone asked me why I thought my calibrated camera info would improve results (I don't know it just seems like knowing exact data would be ideal, no?), but I was surprised.
-
The other thing to consider is that if your have calibrated lens parameters, then using any other values is technically distorting your images. Optimising these after alignment may produce a cleaner result BUT you are altering your images to fit the data. A small deviation may be acceptable, but you have no control over that process.