Skip to content
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

[question] How do I get the camera / mesh position to stay the same? #2408

Open
Sweru-bit opened this issue May 22, 2024 · 4 comments
Open

Comments

@Sweru-bit
Copy link

Describe the problem
I am basically using Meshroom to do a stop motion video in 3D in 30 fps. I have the issue that my meshes are jumping around a bit and the roatation is also changing. To do these meshes, I have imported the cameras.sfm file using the node ImportFromKnownPoses, applied the settings match from known camera poses as well as lock previously reconstructed scenes. The positions in the sfm file are all locked as well. Still, it does appear as if the camera positions are being overwritten by the StructureFromMotion node as seen in the 3D Viewer. The first picture shows only the imported camera positions, the second also shows the positions after structure from motion,
StructureFromMotion
sfmAndStructureFromMotion
The same pictures were used to make the camera.sfm which was imported and for the second run.

The problem increases when I use a different dataset (shot from exactly the same positions) as seen in this screenshot.

DifferentPhotos

I assume this results in different meshes which also have different rotations which can be seen in this screenshot where the images were taken ~ one second apart.
First mesh:
Mesh1
First and second mesh:
Mesh1And38

Pipeline, Pictures & the obj files:
DifferentCameraPositions.zip

Is the difference in camera position the cause for my mesh moving? How do I make sure that the mesh stays in the same position?

Desktop (please complete the following and other pertinent information):

  • OS: win 10
  • Python version 3.8.2
  • Meshroom version: newest release / currend build
@natowi
Copy link
Member

natowi commented May 22, 2024

I did the following:

  • duplicated the camera init node from the first sfm and adjust the folder only in viewpoint image paths
    grafik

  • created new photogrammetry pipeline

  • add FromKnownPose

  • add sfmalignment with from_camera_pose_id

  • connect as follows:

grafik
In featurematching I reduced the Known poses geoetric error to 0

The result is not an exact match, but ok

To get an exact match, use sfmtransfer
grafik

We can even leave out the "fromknownpose" and do it like this
grafik

@fabiencastan
Copy link
Member

fabiencastan commented May 23, 2024

Instead of keeping the viewId, you can also use "from_filepath" in SfMTransfer (if you name your images the same way for each scene, and you can use a regex if the name is not exactly the same).

@Sweru-bit
Copy link
Author

Sweru-bit commented May 24, 2024

@fabiencastan I can not get it to work with from_filepath. Even with default values in the file matching pattern or (\w+).jpeg as my regex and inputting the same file in the reference and input, it results in an error while from_viewId works properly. Do you have any idea what I am doing wrong?
TestPipeline.zip

@natowi
Copy link
Member

natowi commented May 24, 2024

I had the same issue with from_filepath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants