mapillary / OpenSfM

Open source Structure-from-Motion pipeline
https://www.opensfm.org/
BSD 2-Clause "Simplified" License
3.27k stars 843 forks source link

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

Open morioka7 opened 4 years ago

morioka7 commented 4 years ago

Hello,

I try to following process by python script.

Is it possible by using OpenSfM? Thank you in advance for your reply.

-Morioka

paulinus commented 4 years ago

OpenSfM can use segmentation images as input and transfer the segmentation labels from the images to the point cloud. For this, you need to provide your own segmentation of the images.

What OpenSfM will not do by itself is to classify points as vehicle or other labels without the segmentation images being provided first.

morioka7 commented 4 years ago

Dear paulinus

Thank you for your response. I was relieved that OpenSfM has segmentation function.

I have related question. What is a input file format for segmentation? I read dataset.py and understand segmantation file is png file format. But how to define class ID for each segmentation in png file? File name of png file? Are there any specification for this function?

Thank you.

joeboers commented 4 years ago

I've been wondering about this as well, from what I can see in the code it is expecting grayscale images and using the color value as direct numeric labels.

YanNoun commented 3 years ago

@morioka7 @joeboers you can input segmentation as PNG grayscale images, where the value of the color (between 0 and 255) will correspond to some object class. This will be used in the dense point cloud computation and be propagated to the computed 3D points.

You can finally find this class information in the PLY file as the 7th value of each point.