AliceVision
AliceVision copied to clipboard
[calibration] Camera calibration format
Decide the format to use for the camera calibration file. Note that we must be able to deal with:
- a camera with fixed intrinsics parameters
- a camera with intrinsics parameters changing over time (f, pp, and k3)
- a camera rig composed of N (N = {1,2,3}) cameras
So far for the camera localization (voctree or cctag based) a simple txt file is used using a format like this
// the structure of the file is
// int #image width
// int #image height
// double #focal
// double #ppx principal point x-coord
// double #ppy principal point y-coord
// double #k0
// double #k1
// double #k2
as explained here https://github.com/poparteu/openMVG/blob/voctree_localizer/src/openMVG/dataio/IFeed.cpp#L18
Why not directly use the cereal serialization of the existing camera class
yes, the json it's the natural and obvious solution, but we need to define how to deal with a video stream in which the camera calibration is changing over time. So we need something like frame ID -> camera calibration, for each frame or just whenever it changes. I don't know
The SfM_Data format already support that. Why not create a sfm_data file for the video, with different intrinsic for each frame. So you save, load it for an entire video...
yes, the thing i forgot to mention (i will added to the description) is that we deal with a rig of 3 cameras. So we need to take also that into account. (ie one of the camera may change the parameters while the other does not). BTW did you do anything to deal with a rig of cameras, ie like a class modeling the rig or other?
In the SfM_Data class to make some intrinsics shared or not, so you can do whatever you want.
Regarding the rig: I have started a functional draft here: https://github.com/pmoulon/openMVG/blob/develop_rig_subposes/src/openMVG/cameras/Camera_Pinhole.hpp#L136 In which you must update the subpose with known data.
Additionnaly a RigView concept have been created: https://github.com/pmoulon/openMVG/blob/develop_rig_subposes/src/openMVG/sfm/sfm_view.hpp#L73 The idea is to store additional info like the RIG id & subchannel id
cool, that could be useful.
If i understand correctly a rig is composed of several Rig_Pinhole_Intrinsic
, each having a subpose wrt some reference camera. And then in sfmdata each view is like a normal view but it also contains the reference to the rig ID (in case there are several rigs) and an its internal ID inside the rig
You got it. I think it was a flexible solution. The other solution was to make all intrinsic have a subpose and let it bet Id by default (but this solution impose to check always if the subpose is Id or not). I have preferred to make a new class first to test and ensure that the design fit the needs.
Ok thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.