mapillary / OpenSfM

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

What is the file "track.csv"? #152

Closed bryanibit closed 7 years ago

bryanibit commented 7 years ago

Hello! There is a file called track.csv produced by create_track.py. I want to know the content about that. According to the code tracks_graph.add_edge(image, str(track_id), feature=(x,y), feature_id=featureid, feature_color=(float(r),float(g),float(b))), I think the meaning of track.csv (the following line)

DSC07698.JPG 35782 4600 -0.470603 -0.127038 68 84 48 image name track_id feature.x feature.y color.x/y/z

I don't know why the feature.x/y could be negative. Wish I could have an answer. Thank you.

bryanibit commented 7 years ago

figure_1 I used Berlin dataset, and then I got the result using the following words. import matplotlib.pyplot as plt nx.draw(tracks_graph) plt.show() I still don't understand that due to so many covering objects.

zbynekwinkler commented 7 years ago

I don't know why the feature.x/y could be negative. Wish I could have an answer. Thank you.

The feature points are in normalized image coordinates, meaning the range is (-1,1).

bryanibit commented 7 years ago

The origin is located in the center of the photo. Thank you for your answer.

paulinus commented 7 years ago

Yes, the position of feature points is stored in normalized image coordinates. I've just added the definition of those in the documentation WIP http://opensfm.readthedocs.io/en/latest/geometry.html#coordinate-systems

bryanibit commented 7 years ago

@paulinus The doc needs to be finished as soon as possible, which is very useful for the new comers to understand the detail of the project, I think. Especially, we need to add explanations about create_track, reconstruction and mesh, the three python file.