Export Camera Positions

1,484 views
Skip to first unread message

ormapper

unread,
Sep 15, 2012, 1:02:32 PM9/15/12
to vs...@googlegroups.com
Hi folks,

I just discovered VisualSFM and its fantastic! One thing I can't seem to figure out is how/where I can get an export of the camera positions (xyz) from my model. I'm sure I'm just missing something simple, can someone give me a hint?

Thx!

Changchang

unread,
Sep 16, 2012, 8:58:37 PM9/16/12
to vs...@googlegroups.com
This is no dedicated function for that, but it is pretty easy to get camera positions.
1. Use Menu "Sfm->Run CMVS/PMVS", a camera_v2.txt file will be generated for each model.
2. Read the NVM file using the ReadNVM function in the PBA code package.

Changchang,

Vittorio

unread,
Sep 26, 2012, 9:37:48 AM9/26/12
to vs...@googlegroups.com
hi, changchang,

a function would be great, that makes it possible, to export the camera positions (according to the georeferenced pointcloud!!) in a simple ply-file! in this case it would be possible, to use Blender for texture mapping, what would enable to create really perfect results... to create the ply-file from the camera_v2.txt is easy for everybody, but the calculation of the georeferencing is a problem for non-programmers... 

greetings, viktor

Changchang

unread,
Sep 26, 2012, 7:17:16 PM9/26/12
to vs...@googlegroups.com
Just the position would not be enough for texturing, right? You will need also the full camera pose and intrinsic. 

In addition, it is probably a bad idea to run Geo-referencing before dense reconstruction and texture generation. The transformed coordinate system is bad for projections because the origin is far from the object of interest. I think it should be better to use the non-transformed data for dense reconstruction / texture generation, and apply any desired transformations afterwards. 

Changchang

andrea

unread,
Sep 27, 2012, 7:29:01 AM9/27/12
to vs...@googlegroups.com
Hi, generally I use a local reference frame which can be easily related to the geographic one. For instance if the model extension is of some hundredth of meters you can take your UTM coordinates and cut the first digits, those referring to kilometers, and leave just those referring to meters. In this way if UTM is E = 345678.123 N = 5978123.345 Z = 123.456, you get X = 678.123 Y = 123.345 Z = 123.456 in your local system, and you can always go back to the full UTM coords if you need. Changchang, does this make sense to you? And more important: I georeference with respect to this local system before generating the dense reconstruction, in order to get also the photo positiotion and orientation in the camera_v2.txt in the same system. Do you see any problem with this workflow?

Thanks!

ymg

unread,
Sep 28, 2012, 5:25:37 AM9/28/12
to vs...@googlegroups.com
Changchang,

Running dense reconstruction after Transforming to ECEF does not wor for me.  Usual outcome is PMVS crash and fails.

What I normally do is run dense reconstruction , get transform parameters from Vsfm then run the transform via an Autohotkey script on the generated PLY files(s).

What is not clear to me is how to transform the normals (cx, cy, cz) ??

ymg

Changchang

unread,
Sep 29, 2012, 3:50:53 PM9/29/12
to vs...@googlegroups.com
Given a point at location X with normal N, if we apply a rigid transformation Y = S * R * X + T, the transformed normal should be simply R * N.

VisualSFM will compute such a rigid transformation to ECEF and you should have another rigid transformation to certain UTM zone. I think you just need chain up the two transformations.

Changchang

ymg

unread,
Sep 30, 2012, 12:10:16 PM9/30/12
to vs...@googlegroups.com
Changchang,

Thanks, works perfectly!

ymg

Charles Le

unread,
Jun 4, 2020, 3:27:16 AM6/4/20
to VisualSFM
I cant see the option to do "Sfm->Run CMVS/PMVS"
Reply all
Reply to author
Forward
0 new messages