colmap / colmap

COLMAP - Structure-from-Motion and Multi-View Stereo
https://colmap.github.io/
Other
7.84k stars 1.54k forks source link

How to select points of object in dense point cloud? #762

Open morioka7 opened 4 years ago

morioka7 commented 4 years ago

Hello,

I try to following process by command-line interface.

Is it possible by using COLMAP? I think "Consistency Graphs" is one of possibility. Does "Consistency Graphs" have mapping information from each dense point to pixel in the image,

Thank you in advance for your suggestion.

tsattler commented 4 years ago

The consistency graph will give you for each 3D point the list of images from which it was generated (see https://colmap.github.io/format.html#consistency-graphs for details). You can then project the 3D points into the images (using the intrinsic and extrinsic parameters in the sparse/ folder) to get the corresponding image pixels. You can then use these pixels to determine whether the 3D point corresponds to a structure, e.g., vehicle, that you want to export. However, you will need to implement this yourself as there is no native functionality for this in COLMAP.

morioka7 commented 4 years ago

Dear tsattler

Thank you for your response. I have additional questions.

You said “project the 3D points into the images”. Does these 3D points mean dense point cloud or parse point cloud?

Thank you.

-Morioka

tsattler commented 4 years ago

Dear morioka7,

from what I understood, it seems you want to find out which of the dense points belong to objects. In this case, it seems you would want to project the dense points into the images.

morioka7 commented 4 years ago

Dear tsattler

Yes, I would line to project the dense points into the images. Is it possible by using "Consistency Graphs"?

-Morioka

tsattler commented 4 years ago

As described above, you can use the consistency graphs to determine which dense point was created from which image.

morioka7 commented 4 years ago

Thank you for you help. I will try consistency graphs.

fclairec commented 2 years ago

Hi @Morioka7, Hi @tsattler I would like attempt something similar. Could you give me some help with opening the consistency-graph files? I would like to stick to python for doing this. The description sais:

the graph is stored as a mixed text and binary file, while the text part is equivalent to the depth and normal maps and the binary part is a continuous list of int32 values in the format .... Here, (row, col) defines the location of the pixel in the image followed by a list of N image indices.

I am using width, height, channels = np.genfromtxt(fid, delimiter="&", max_rows=2, usecols=(0, 1, 2), dtype=int) but can't figgure out how to get the binary part.

Also I would lik to ask you if the consistency graph is really able to give me the following mapping: 3D point to image indexes used for reconstruction. The description just above does not include this, rather (row,col) seem to be locations on the images themselves.

I would be really greatful for some pointers here. Thanks a lot :)