I have both intrinsic and extrinsic parameter for my calibrated cameras.
That means I have for each image:
focal length(pixel),
principle point(pixel offset to image center),
no skew
3*4 matrix [R t]
image is undistorted
I want to modify XMP file to give these infomation
So I edit XMP file like this, “-----” should be filled by my values:
- Code:
<x:xmpmeta xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description xmlns:xcr="http://www.capturingreality.com/ns/xcr/1.1#" xcr:Version="2"
xcr:PosePrior="locked"
xcr:DistortionModel="perspective" xcr:DistortionCoeficients="0 0 0 0 0 0"
xcr:FocalLength35mm="--------" xcr:Skew="0" xcr:AspectRatio="1"
xcr:PrincipalPointU="---------" xcr:PrincipalPointV="----------"
xcr:CalibrationPrior="locked" xcr:CalibrationGroup="-1" xcr:DistortionGroup="-1"
xcr:InTexturing="1" xcr:InColoring="0" xcr:InMeshing="1" xcr:version="2.2.0.0">
<xcr:Rotation>----------9-float-numbers----------</xcr:Rotation>
<xcr:Position>----------3-float-numbers---------</xcr:Position>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
Questions:
-
xcr:FocalLength35mm, how can I convert focal in pixel to 35mm format ?
I checked this https://en.wikipedia.org/wiki/35_mm_equivalent_focal_length page, there are several different conversions, which one should I use ? f35 = 36.0 * f / w ? -
For <xcr:Rotation> and <xcr:Position>, which convention do you use?
The matrix [R t] ?
Or the rotation which rotate the world axis to image axis, which is the inverse of R
and the position of camera in world coordinates C = -R^-1 * t ? -
I saw in RealityCapture the “Yaw/Pitch/Roll” option for Prior pose, which convention do you use ?
I tried many times to figure out which convention you use. It turns out very wierd:
The world has X,Y,Z axes, right handed, Z pointing upward.
At the begining, camera is pointing to world negative X direction. top of the image pointing to Z direction.
Firstly do Yaw, a positive Yaw turns the camera to left (like a car turns left)
Then do Pitch, a positive Pitch lets the camera look down
At last do Roll, a positive Roll lets the camera turn around its optical axis anti-clockwise (imagine you hold the camera then turn it anti-clockwise)
Am I right about this ? This convention is a little wield for me. In this https://en.wikipedia.org/wiki/Aircraft_principal_axes wiki page, a positive yaw turns aircraft to right, and a positive pitch let aircraft look up.