-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SFM: Known intrinsic parameters #154
Comments
Currently, there is indeed no obvious way to introduce known camera intrinsics. The focal length is obtained from the EXIF tags, and principal point is set to the image center. One would have to inject the known focal length into EXIF and use I have to look into what must be done to initialize the intrinsics from the views. In combination with |
This feature request raised a few design issues. Most importantly, we need to normalize feature coordinates which is a larger change in the SfM library. Also, the prebundle.sfm file might change to a matching.sfm file. This suggests that we implement this change before the release of MVE2. |
Prerequisite issue #126. |
A feature Is this already useful for you in the current state? |
Hello, I am looking for a solution to include known intrinsics(all intrinsics along with focal length). Is it possible to include known intrinsics other than focal length as well in the EXIF info? If yes, what should be the format of exif info? Also can we include approximate positions? Many thanks! |
Only the focal length can be provided in the EXIF info. A precise focal length can be provided in the |
A solution to handle arbitrary intrinsics could be as follows. You warp each image using its calibration intrinsics, so that the warped image has a canonical intrinsic matrix of [f, 0, imageWidth/2; 0; f; imgHeight/2; 0, 0,1]. Then you just plug f into the EXIF tag, and it's done. |
This will, however, still optimize the intrinsics if |
Hi - yes I assumed --fixed-intrinsics would be set :-) Regarding the fact that EXIF only supports integer values, it's not really a problem. The canonical intrinsic matrix can have an arbitrary f (and so can be set to an integer). This could be done by rounding the original intrinsic matrix's fx value. So the workflow could look something like:
The nice thing about this is that beyond some image pre-processing there would be no significant code/design changes. One thing to point out is that when you undistort an image and warp it with a homography there can be visible borders that correspond to the perimeter of the original image. These borders may produce spurious features and it could be necessary to remove them. Hope this helps. |
That's an interesting approach. If you set |
I added camera.focal_length = 20 to the meta.ini file of all the views in the scene, but every view reported "Warning: View X has zero focal length. Using fallback.". I am new to the process, so perhaps I am missing something obvious to others. |
First, Second, you also have to pass |
Based on comments in the threads discussing focal length, I entered the "FocalLengthIn35mmFilm" value which is 20 (mm). I have attached an exif dump of one of the pictures. I did use the --intrinsics-from-views option as instructed in this thread, after adding the text line "camera.focal_length = 20" to each meta.ini file. The camera is a stock DJI Phantom 3 Advanced camera. |
You would still have to provide |
On another note, MVE should pick up on the EXIF field |
Should the line added to meta.ini be "camera.focal_length = 0.6666" or "focal_length = 0.6666". I have seen it referenced both ways now. As far as checking on the FocalLengthIn35mmFilm being ignored, how do you want me to assist you (be specific)? |
meta.zip |
You have to put |
PLease change the Title to SFM: Known intrinsic parameters and camera pose; Will be nice to have this __ |
@HelliceSaouli This issue is about SfM. If you know the camera pose, you don't need SfM. You just need a way to generate 3D features. |
Don't be mad at me ^^ |
See pull request #431 for a draft of this feature. |
I understand from above that if you add intrinsics in meta.ini, then you need to run sfmrecon with "--intrinsics-from-views". But should you then also always set --fixed-intrinsics?? |
I think if you specify |
Before running sfmrecon, the meta.ini-files contain only the following info:
So I suppose I should loop over the meta.ini-files and add [camera][focal_length] and [camera][principal_point] to the files BEFORE running sfmrecon if I want to use beforehand known values? But when I do that, the added values are overwritten when sfmrecon even though I specify "--intrinsics-from-view". So how should it be done?? |
That's right, the
Note that |
Hi,
I was looking at the code but I was not able to find any way to introduce known intrinsic camera parameters with the images. Did I just overlooked it, or for now there isn't any efficient way to do it before computing SFM reconstruction?
Thanks
The text was updated successfully, but these errors were encountered: