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] Store (x, y, z) of every point in every input image #824

Closed
Osamabu opened this issue Mar 10, 2020 · 13 comments
Closed

[question] Store (x, y, z) of every point in every input image #824

Osamabu opened this issue Mar 10, 2020 · 13 comments
Labels
stale for issues that becomes stale (no solution) type:question

Comments

@Osamabu
Copy link

Osamabu commented Mar 10, 2020

I want to use meshroom to create a point cloud system. I want also to store the mapping of each point in the images and where it maps in the point cloud. This is basically the (x, y, z) coordinates of the matched point. That is if an image point is (u, v), it corresponds to (x, y, z) in the point cloud. Can I do that?
Thanks

@simogasp
Copy link
Member

The output file of the Structure From Motion contains this information stored in Observations. This is a list of 3D points (of the cloud) and, for each of them, there is a list of 2D points indexed by the viewID which corresponds to the 2D feature point on that image.
You can extract the information from the sfm.abc you find on the node or, if you need a simpler format to process you can add a ConvertSfMFormat node to convert it:

image

just select the format (eg json) in the combo box and run the node.

@Osamabu
Copy link
Author

Osamabu commented Mar 11, 2020

The output file of the Structure From Motion contains this information stored in Observations. This is a list of 3D points (of the cloud) and, for each of them, there is a list of 2D points indexed by the viewID which corresponds to the 2D feature point on that image.
You can extract the information from the sfm.abc you find on the node or, if you need a simpler format to process you can add a ConvertSfMFormat node to convert it:
just select the format (eg json) in the combo box and run the node.

Thank you very much. Is it possible to do this from command line too? Thanks!

@natowi
Copy link
Member

natowi commented Mar 11, 2020

Yes

@simogasp
Copy link
Member

if you mean Meshroom's command line, yes, but you need first to modify the graph as in the picture and then run only the node using bin/meshroom_compute.

You can do it also from the command line using the AliceVision binary with the same name, aliceVision_convertSfMFormat (.exe if u are on windoze).

@Osamabu
Copy link
Author

Osamabu commented Mar 17, 2020

Thank you. This was very helpful. One more question. Are these absolute measurements or relative. What I mean can I do distance measurements using these files?
Thanks

@natowi
Copy link
Member

natowi commented Mar 17, 2020

As far as I know, you need to scale the point cloud to a known scale first.

@stale
Copy link

stale bot commented Jul 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale for issues that becomes stale (no solution) label Jul 15, 2020
@stale
Copy link

stale bot commented Jul 23, 2020

This issue is closed due to inactivity. Feel free to re-open if new information is available.

@lwndlnd
Copy link

lwndlnd commented Jul 31, 2023

Does anyone know how to do this for every 3D position instead of only the feature points? I've tried with the Dense SfM data but it does not give a meaningful value for the image point (u, v) (see #1970)

@natowi
Copy link
Member

natowi commented Jul 31, 2023

@lwndlnd Does the ConvertSfMFormat node help? Structure should include depth information, using Image Whitelist you can even limit the images to export:
grafik

@lwndlnd
Copy link

lwndlnd commented Aug 1, 2023

@natowi Thanks for the response, the white list is actually very useful! I'm already using the ConvertSfMFormat node. My question is if this is also possible with the dense SfM data
Screenshot from 2023-08-01 13-27-20
It contains both the 3D and 2D points but the 2D points don't seem to make any sense:

Screenshot from 2023-08-01 13-26-42
Left is the SfMData directly from the structure from motion and right from the Meshing node

@natowi
Copy link
Member

natowi commented Aug 1, 2023

@lwndlnd When I remember correctly, you need to select the describer used before to include it in the output. In your case, select dspsift

BTW: A converter to convert depth maps files (exr) to obj meshes is wip: alicevision/AliceVision#1417

@lwndlnd
Copy link

lwndlnd commented Aug 2, 2023

@natowi I set the describer type to dspsift in the first ConvertSfMFormat node. If I select dspsift in the second one after the meshing no observations are exported.

I'll definitely try the depth map converter when it's ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale for issues that becomes stale (no solution) type:question
Projects
None yet
Development

No branches or pull requests

4 participants