-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ERROR with modified cameraInit.sfm #788
Comments
Hi natowi, I already checked those links as I was looking up how to do it and I could not find anything in the issues that could help me. |
I did find an interesting pull request: How can I use this node? |
IncrementalSfMis accessed by the SfM node, but it is possible this parameter is not yet implemented in the gui. Maybe "Use only matches from input folder" ? |
Okay, not in the gui yet. Could you show me how I could run it in the terminal so that I can specify the image folder and the cameraInit.sfm file? Also, what do you mean with:
|
I did not yet try to use the sfm node with a custom sfm file. The exe files in Meshroom-2019.2.0\aliceVision\bin can be run in the cli, also meshroom_compute and meshroom_photogrammetry in the main Mehroom folder. Run without commands in the cli to display the help. Use only matches from input folder was the only option in the gui that I guessed could be of use. |
I already discarted all images which did not have a match. Here #786 I already asked about how to change the cameras.sfm file in the StructureFromMotion node. There, it does not take the changes into account and the following node seems to use the .abc file instead of the .sfm file as input. Any ideas how else I could procede? |
I tried using an existing sfm file. Can you try the following with your known camera positions:
When creating your own sfm file, set the folders to empty:
|
@fabiencastan Can you explain the correct usage of a sfm file with known camera positions? I would like to add this to the FAQ |
I just tried it again following all your instructions. The SFM node just turns red and does not run. This is what I get:
I should mention that Meshroom is only detecting the poses of 5 cameras and I give it all camera poses. Could this cause the error? And why does it complain about 'poseid'? |
Can you provide a sample dataset (images, original poses and your created sfm file) for testing? With my sample data, using the method described above, the parameters stay close to identical. (I computed the Camerainit node, openend the folder and replaced the cameraInit.sfm with my sfm file, then computed the other nodes) |
Could you please provide me your contact information? This is what I got. I modified the cameras.sfm file from the SFM node. I can't imagine that there is a lot of difference between the cameraInit and the cameras file. |
You can simply send the dataset or download link to the private mailing list alicevision-team@googlegroups.com I checked your initial code snippet. You mixed up the element order and missed quotation marks. Your code:
That is causing the error
Fixed code:
|
I checked the files you sent. You need to re-write the entire sfm file. Use a sfm file from a computed SfM node as guide. (About your image dataset: do not capture images too close together, as this does not improve the reconstruction and only increases computation time. Remove images that are out of focus. When using videos, Meshroom can select suitable images for you) With your fixed sfm file the SfM node should work, but you could also try the StructureFromKnownPoses node (copy the py to the meshroom/libs/meshroom/nodes/aliceVision folder): |
Thanks a lot for your help. I will follow your advice. Also, I placed the StructureFromKnownPoses.py inside the given folder, but it does not show up inside Meshroom as an option from the list. Do I miss a step? |
Run the graph to the StructureFromMotion node. Open the StructureFromMotion node folder. It contains the cameras.sfm file. Use the file structure to build your own sfm file. I would recommend you to use a small subset of your images (four or five images), run the graph to the SfM node to get the cameras.sfm file to start with.
Restart Meshroom. This node also requires a valid sfm file |
Okay, I just followed all the steps: rewriting the sfm file, settings like described. My remaining issued:
I get a different output log which indicates that I am on the right path. But it does not show a warning. It indicates: |
From what I can read from the log, the triangulation works, but later on all the images are dismissed. Maybe this has something to do with not setting the cameras to calibrated, You can also try the StructureFromKnownPoses node, this node only triangulates the points. This can also be caused by your dataset (many images taken from the same point or with marginal differences, unsharp images, unconnected images). With the default parameters, only 5 of 50 cameras are reconstructed. You could try to get better results by setting the quality to High or ultra and add AKAZE, but my recommendation is to use a dataset that reconstructs all cameras with the default pipeline. |
I have set the "initializationMode": "calibrated", I took another dataset and set the quality to "high" and I added "AKAZE". For the rest I used the standard pipeline except that I used my modified cameraInit.txt containing the known poses of the cameras. The SFM node still turns red. I still can't figure out what it the problem. Also, I can't figure out how to use the StructureFromKnownPoses node. It does not show up in the list of nodes, even though I added it to the directory as you explained. Here is the log file of my latest run: It just says: The local bundle adjustment refinement has not been done: the new cameras are not connected to the rest of the graph. Does this mean that my images are not good enough? |
Likely yes. As I wrote before, "With the default parameters, only 5 of 50 cameras are reconstructed". This is really bad "(many images taken from the same point or with marginal differences, unsharp images, unconnected images)". When you have a bad or difficult dataset and try something new as imposing known camera positions, it is difficult to pinpoint the origin of an error. So create a new dataset that has a 70% image overlap, in focus, taken from different positions and covering the area of interest. Now all your cameras should be reconstructed using the default graph. Then you can try a new project with your known camera positions with this dataset. |
Okay. I think I get it. One last time, I want to ask for confirmation about this log messages. It also indicates that I need better images, right? If yes, then I start to understand the software. Could you please have a look? Also, I thank you very much for your support so far. |
Yes, there are not enough points reconstructed from the ~ five cameras. |
Okay, I understand. It ust surprises me that Meshroom can produce a reasonable 3D Mesh when I don't impose the camera poses. Thanks a lot for your help. |
I think this will change once this feature will be officially introduced. |
Issue
I need to make a 3D reconstruction of a surface and I use a set of pictures where I know the exact position of the camera for each picture. When I first run the CameraInit node and replace the cameraInit.sfm file with my own sfm file containing the poses of the cameras, Meshroom stops during the ImageMatching node with an error.
Log
The log file says the following.
Additional context
I use Ubuntu 18.04.
The format how I added the camera poses is as follows, as a list of poses. The rest of the file is simply copied from the original .sfm file.
I need help to understand how to get this working.
The text was updated successfully, but these errors were encountered: