Export Bundle.out file
Answered
Hello,
I would like to know if there is a scaling or some other transformation in the bundle.out file generated by your software?
I have a 3D scene where the focal length are much bigger than what i should get.
I noticed as well that the OPK file and the Bundle.out does not match since the positionning (for instance) of the cameras are not the same between these two files.
Is there any explanation?
Cheers,
I would like to know if there is a scaling or some other transformation in the bundle.out file generated by your software?
I have a 3D scene where the focal length are much bigger than what i should get.
I noticed as well that the OPK file and the Bundle.out does not match since the positionning (for instance) of the cameras are not the same between these two files.
Is there any explanation?
Cheers,
-
Hi Marion,
we are following bundle.out structure as it was defined by University of Washington
Focal length is in image pixels.
Nevertheless, you can redefine how it is exported easily in "calibration.xml" file which is located next to reality capture executable in your installation folder.
This is what you can find there:- Code:
# Bundle file v0.3
$(cameraCount) $(pointsCount)$ExportCameras(
$(f*scale) $(k1) $(k2)
$(R00:g) $(-R02:g) $(R01:g)
$(-R10:g) $(R12:g) $(-R11:g)
$(-R20:g) $(R22:g) $(-R21:g)
$(tx:g) $(-ty:g) $(-tz:g))$ExportPoints(
$(x:.8) $(-z:.8) $(y:.8)
$(r) $(g) $(b)
$(trackLength)$ExportTrack( $(imageIndex) $(featureIndex) $(x*scale:.3) $(-y*scale:.3)))
OPK exports rotation in three angles which are relative w.r.t. coordinate system and it exports camera position vector instead of camera translation.
It means that to get a point X from the world coordinate system to an image, you need to do this:
y = [R t] * X
y.x = focalLength * y.x / y.z + imageWidth/2
y.y = focalLength * y.y / y.z + imageHeight/2
where imageWidth and imageHeight are width and height of the corresponding undistorted image.
Please sign in to leave a comment.
Comments
2 comments