Hi,
We’re trying to import verified fixed lens camera calibrations from another software (matlab) so we can use a fixed camera group for all our images. I have a focal length, principal point and 3 radial distortion numbers – is there any way to convert these to the 35mm/brown3 model that reality capture uses? Or do you know of any other software for manually finding lens calibrations that would be compatible? The matlab tool allows you to set a real world scale versus the test pattern which seems necessary.
We need the model to be as accurate as possible because we need to merge model segments later.
Thanks,
Hi Lucas,
there are more options.
-
import your calibration using XMP file. To get a syntax of the XMP file, simply calibrate something inside RC and export XMP from it. It is a simple XML with tags for rotation, translation, calibration params. You can define lens model there too.
-
un-distort images before importing and write your projection matrix P into a text file. If you have lambda*u = P*X equation with P=M[3x4] then simply write matrix to txt file in asci mode directly from matlab. That means 4 values in each row and 3 lines.
In both cases the import mechanism is as follows:
- when adding image “imagename.ext” to RC
- RC searches for “imagename.xmp” and “imagename.txt” file
- if found it will read it and setup priors/camera model/params/flags from it
You can completely fix camera so that RC will not further optimize it. You can also set it as “draft” which means that RC will optimize camera poses. You can fix each group of params independently, e.g., fixing calibration while optimizing pose etc. There is also an option to fix relative motions, which is good if you want to allow transforming your imported cameras by a similarity transform [sR t].
regarding other questions:
… 35mm/brown3 model that reality capture uses? Or do you know of any other software for manually finding lens calibrations that would be compatible? …
If you select brown3 model in RC then the equation is lambda*u = K* brown( P*X ), where u is 2D projection, K upper triangular calibration 3x3 matrix, P projection 3x4 matrix and X is a 3D point.
That means - the model coefficients are independent from the projection plane units.
If you want to convert your coefs from 35mm/unitary image plane/pixel size, then you need to multiply brown coefs adequately.
The matlab tool allows you to set a real world scale versus the test pattern which seems necessary.
Please not that fixing internal camera calibration does not solver world scale problem.
We need the model to be as accurate as possible because we need to merge model segments later.
You can do it in RC too. XMP allows defining groups of connected components which can differ by a similarity transform [sR t]. Grouping is defined with a GUID (you will see it when you export any XMP). Then set the camera pose to fixed relative mode.
Hi Martin,
To follow up and absolutely clarify your post, is the 3x4 matrix the projection matrix or the modelviewprojection matrix? Is this matrix supposed to transform the world 3d points to image space?
Thanks