Im trying to tune my headless photogrammetry pipeline and would like to export the lens distortion information to Lichtfeld Studio. I cant figure out how to get the cameras to be anything but pinhole. If i open the rs file in the gui and select an image i can see that it has its registration lens distortion set to Brown 3.
There doesnt seem to be any actual distortion settings in the registration apart from making undistorted images.
here are the settings i use:
realityscan-cli -headless -printProgress -newScene -addFolder [my folder] -selectAllImages -setPriorCalibrationGroup 0 -setPriorLensGroup 0 -editInputSelection “inpDistortion=0” -editInputSelection “inpDistortionModel=2” -deselectAllImages -align -selectMaximalComponent -exportRegistration “$5\transforms.json” “$6\transforms2.xml” -quit
Your input settings are fine. inpDistortion=0 sets the lens distortion prior to “Unknown”, so it gets estimated during alignment, and inpDistortionModel=2 picks Brown3. That matches what you see in the GUI.
The pinhole cameras most likely come from the second argument of -exportRegistration. transforms2.xml holds the export settings from the Export Registration dialog. If it was saved with Undistort images set to Yes, RealityScan undistorts the images on export and writes the cameras as pinhole with no distortion terms. That’s expected for that option.
To keep the distortion in the export:
Open the Export Registration dialog in the GUI and choose your format.
Set Undistort images to No.
Save the settings again and use that XML in your command. You can also open your current XML and check that calexExportUndistorted is false.
With that, a COLMAP text export writes a FULL_OPENCV camera to cameras.txt (fx fy cx cy k1 k2 p1 p2 k3 …), and the Radiance Fields transforms.json writes k1/k2/k3 per frame.
Last time I tried Lichtfled Studio, it actually complained that I provided original distorted images. If Lichtfeld Studio can train on distorted cameras, I’d go with the COLMAP distorted export.