Export of registered cameras and sparse points.
AnsweredHello,
I know that I can use the calibration file in the Capturing Reality folder to customise the export of aligned / registered cameras. However I have a bit of a hard time to figure out how to get raw image coordinates for the detected features.
Does someone know the meaning of the following keywords found in the calibration file?:
- ($f*scale) # what is the meaning of the scale, scaling the focal length of the camera
- undistortImages # if set to "always" does this also affects the exported 2D point coordinates?
- undistortPrincipal # what is the meaning? - does this normalise the coordinates of 2D features?
Thanks
Alex
-
Hello,
to make image features invariant to image resolution we always transfer them to unit width or height image with preserved aspect ratio. Image is also shifted so that image center is at 0,0;
If you are referring to 2D coordinates exported using "$ExportTrack(..)", then here they are undistorted too if you export with undistortion option set to true.
So to get pixel location of a feature point you need:
x: $(x*scale + width/2)
y: $(y*scale + height/2)
$(scale) is internally always set as max( width, height ) which is the scaling factor from the unit size image to real width/height image.
Principal point undistortion here affects how the undisorted image is generated. If set to true, then image is corrected so that optical center is in the image center. This may result in adding black (background color) space around the image to achieve this.
$x and $y coordinates are compensated automatically and you should not need to do anything.
I will double-check if everything works as expected.
Thanks,
Martin
Please sign in to leave a comment.
Comments
1 comment