Hi
This is more of a question.
Does openMVG need the EXIF data always?
I tried reconstructing by removing the EXIF data it failed.. Same images with EXIF worked!
Reason I am asking that I want to reconstruct using video frames,
OpenMVG can work with data that does not have exif data.
You have to provide the value of the focal length by hand to the SfMInit_ImageListing binary.
You can use the -f X option. X is the value of your focal length in pixel.
If you don't have any value you can compute an approximate focal length with this formula:
focal_pix = 1.2 * max(w,h)
Thank you. I will try it.
Hi
Another question,
I am planning to do camera calibration and then pass the images to openMVG (I need the model to be as precise as possible)
When I am passing the undistorted images with the calibrated focal length (with -f X) It does not work.
It does work if I pass the same uncalibrated images.
Any advice?
SfMInit_ImageListing is a way to prepare the scene file (view, intrinsics data and relationship with intrinsic and pose ids)
-C option) and thenYou can initialize the json file and then edit the parameter by hand. And launch the other tools (that will use the provided distortion factors).Since OpenMVG should work with your undistorted images too => If you want more feedback we can discuss it on openmvg-team[AT]googlegroups.com (I mean exchange data and see why it's not working with undistorted image).
@pmoulon Thanks for the reply.
Is there any option in openMVG to tell it not to undistort the images?
You must use the camera model -c 1 in SfMInit_ImageListing binary.
It will use a classic pinhole camera model (Focal + PP will be the only used parameters).
Else on the SfM binaries you can control the intrinsic parameter that are refined by the BA. So from the command line you can choose if the intrinsic parametrization (constant or variable groups of parameters).
For example using --refineIntrinsics NONE for the SfM pipeline will constraint the parameter to be kept as constant.
To refine only the focal you can choose --refineIntrinsics ADJUST_FOCAL_LENGTH.
You can also combine some parameters: --refineIntrinsics ADJUST_FOCAL_LENGTH|ADJUST_PRINCIPAL_POINT to refine the focal length and the principal points.
@pmoulon can you tell me how openMVG undistorts images without knowing camera intrinsic parameters? That is without knowing K1, K2, K3.
I used undistorted images with -c 1 for SfMInit_ImageListing
Command:
"/home/ntweat/openMVG_build/Linux-x86_64-RELEASE/openMVG_main_ComputeFeatures -i /home/ntweat/web/output/dataset1/matches/sfm_data.json -o /home/ntweat/web/output/dataset1/matches -m SIFT -f 1 -p ULTRA"
and
--refineIntrinsics NONE
Command:
`
"/home/ntweat/openMVG_build/Linux-x86_64-RELEASE/openMVG_main_GlobalSfM -i /home/ntweat/web/output/dataset1/matches/sfm_data.json -m /home/ntweat/web/output/dataset1/matches -o /home/ntweat/web/output/dataset1/reconstruction_global --refineIntrinsics NONE"
`
I am getting the following error, it works with the original images
`- Features Loading -
0% 10 20 30 40 50 60 70 80 90 100%
|----|----|----|----|----|----|----|----|----|----|
CleanGraph_KeepLargestBiEdge_Nodes():: => connected Component: 0
Cardinal of nodes: 0
Cardinal of edges: 0Invalid input image graph for global SfM
`
@pmoulon I am getting a 1080 ti for openMVG and openMVS. Which fork would you suggest I test (the most stable one)
OpenMVG estimate the distortion related to your image during the SfM pipeline (thanks to the BA).
If you use openMVG_main_GlobalSfM you must use openMVG_main_ComputeMatches with the option -g e. You must also ensure you have a valid intrinsic data setup.
there is not GPU usage in OpenMVG yet (It's coming with the develop_koral branch). Regarding OpenMVS I advise you to use this repo: https://github.com/cdcseacave/openMVS/
Thanks I was able to fix the issues (I was not passing the intrinsic parameters while listing images)
I passed the intrinsic information (-k) option in pixels. I hope it is correct.
I have another question, How to use the video mode.?
I have 30 seconds videos and want to generate models. When I extract all the frames they don't have the EXIF data.
Do I use the "-f" option to give the focal length?
Yes you can use the -f option to specify an initial focal length.
You can also constraint the matching to only the X neighbor frames with the -v Y option on ComputeMatches. You can loose some loop closure but the matching will be faster.
@pmoulon Thank you very much. I will do some tests and if I need any more help I will open the thread again.
Thank you.