openMVG / openMVG

open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.
Mozilla Public License 2.0
5.68k stars 1.67k forks source link

Question: SfM / Cameras clipping / Results cut off #1003

Closed giers10 closed 7 years ago

giers10 commented 7 years ago

Hi,
I used my smartphones camera SM-A300FU with a sensor width of 3.3, which I added to sensor_width_camera_database.txt, to take the following sequence of images of a woman: https://goo.gl/m36dk4
I'm using FlachyJoe's pipeline with OpenMVS to get Blender-ready .obj's.
The results I'm getting have the right proportions, also the cameras positions and angles appear correct, yet what the camera "sees" appears to be "cut off". This is what it looks like:
https://goo.gl/qRrwrX
There's a big sphere in the middle that doesn't seem to be detected. There is a part of the womans torso to be seen but I need the whole head, or at least the front-side of the head, for further processing.
I tried changing the focal value in SfMInit_ImageListing to very high and very low values, results are still similar.
I also tried changing different parameters on different instances of the pipeline like using the upright feature in ComputeFeatures, still, no good results.
Where am I going wrong?

pmoulon commented 7 years ago

Reconstructing faces is often challenging for the following reason:

So I would advise you to run the pipeline with the feature preset set to HIGH or ULTRA. I can give a try on your dataset later in the week and tell you if I obtain something.

BTW: I cannot access to your second shared goo.gl link.

Regarding the focal value, if you add your camera model correctly to the database you do not need to specify a focal value. But if you want you can specify a focal guess value by setting -f X. With x equal to 1.2 * max(w,h) -> -f 1958.4

pmoulon commented 7 years ago

I made a try with more features per images (using feature preset on main_ComputeFeatures with -p HIGH or -p ULTRA) and then I was able to see some 3D points on the face. But very few. I will try to run a MVS method on the result later on.

Please note that face reconstruction is challenging. Professional studio use fixed camera and good lighting to ensure to capture every detail.

FYI, One other way to deal with the lack of feature correspondence between images of faces can be to take more images (like in continuous shooting - sport mode for example).

giers10 commented 7 years ago

Thank you sir.
I also tried it with -p ULTRA and also tried -m AKAZE_FLOAT .
No better results. I was thinking if there might be a way to enhance the source material in order for point generation to be more focused on the face, like blur the background out or add colored noise. I tried painting all the backgrounds white and black respectively but that didn't work at all.

pmoulon commented 7 years ago

The camera focus was not good on the face and so you even if you use some mask you will still does not detect a lot of feature on the face.

Are you sure that the feature was recomputed, else the old ones are read again?

You can also make a new dataset with more images or draw some pattern on the face. See here some experiments http://arc-team-open-research.blogspot.com/2013/09/scanning-face-in-3d-with-photos.html

giers10 commented 7 years ago

Thanks, that helped me a lot.
I now know where I went wrong - at the point of creating source material in the first place - and I understand that I need to redo the pictures in order to get good results.

pmoulon commented 7 years ago

You're welcome. Don't hesitate to ask more question or to share some reconstruction on G+ with the hashtag openMVG ;-)