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 - giryit

Pages: [1]
1
Python and Java API / Re: ViewPoint Rotation Matrix
« on: August 09, 2017, 09:29:18 PM »
Thank you, that worked nicely!

I have one followup question. I am now capturing the model view, and storing it as a .jpg, and I want to add a marker projection based on this 2D image. However, the coordinate of the marker in this viewpoint image does not seem to correspond to the coordinate in the actual image in a way which I comprehend. A toy example is as follows:

1. All camera dimensions are set at 2000x2000
2. Model viewer dimensions are set at 500x300
3. I "look through" camera 0
4. I capture the 500x300 image from the model viewpoint
5. I label a point on that 500x300 image

At this stage I want to be able to take that labelled point from the 500x300 viewpoint image and map it to the corresponding point on the 2000x2000 image.

2
Python and Java API / ViewPoint Rotation Matrix
« on: August 08, 2017, 11:14:22 PM »
Hello,

I am trying to generate a matching camera rotation matrix to the viewpoint. I use the "look through" option of camera 0 to get the correct viewpoint in the model viewer. From there, I want to reproduce chunk.cameras[0].transform using only the PhotoScan.app.viewpoint datastructure in my script.

I figured out I could get the translation component using the viewpoint center as follows:
chunk.transform.inv().mulp(PhotoScan.app.viewpoint.center)

However I could not get the same process to work on the rotation component.

Any help would be appreciated, thanks!


Pages: [1]