Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - gerg

Pages: [1]
1
Python and Java API / Re: Rotating a georeferenced model
« on: March 21, 2017, 04:10:20 PM »
Hi Alexey,

My goal is to take a geo-referenced model that I've already built, set the model origin to the centroid, and perform a few simple rotations (trying to get +X North, +Y East, +Z Down). Then, I want to export an obj in local coordinates (meters), and a kmz file. I would like to be able to later extract the kml file to geo-reference the obj.

I've succeeded in doing this transformations for non-geo-referenced models, but I believe the geo-referencing is causing some issues.

Thanks,

Greg

2
Python and Java API / Re: Rotating a georeferenced model
« on: March 20, 2017, 11:00:42 PM »
In addition, how do you manipulate position in local coordinates of a geo-referenced model? I'm trying to have the model origin in local coordinates be the centroid of the model, but I'm running into a lot of trouble.

3
Python and Java API / Rotating a georeferenced model
« on: March 17, 2017, 04:37:42 PM »
Hey all,

I'm trying to rotate a georeferenced model so that it is in a specific orientation when exported. When I do even simple rotations (like 90 degrees about Z axis, for example) I end up with a bizarre rotation. As a sanity check, I have used the same exact script to rotate a non-georeferenced model, and I had no problem doing exactly what I want.

Is there a secondary matrix for georeferenced models that I also need to refer to when trying to do this rotation? Like one that changes from local coordinates to absolute coordinate?

Example for yaw 90 degrees:

...
T = PhotoScan.Matrix( [[0,-1,0,0],
                         [1,0,0,0],
                         [0,0,1,0],
                         [0,0,0,1]]);
chunk.transform.matrix = chunk.transform.matrix * T
...

Many thanks,

Greg

Pages: [1]