You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.
So, if I want to apply a translation, what I do first is to multiply also the translation matrix for the matrix of the bounding box in the form:
high_x low_x
high_y low_y
high_z low_z
Then I substrate high minus low of echa point, and I divide also each point by -2 to get the translation of x, y, and z. and aI add this column to the view matrix.
This works for almost all cases, but there are cases when this doesn't work and the image that i get is too small for one or all perspectives.
What I've seen is that for a large image with the top of the bounding box in the center of the coordinate axe I take very small pictures in all positions. And for images with one of the dimensions of the bounding box too much larger than the other two, I also get the image very small for two of the perspectives...
My question is fi you know any function to apply to the column of translation of the transformation matrix to emulate the zoom in of the camera in those cases keeping the image framed
The text was updated successfully, but these errors were encountered:
The basic idea would be to take axes of the view matrix and use those to define the translational component of the view matrix, based on the bounding box center.
So something like: viewMatrixTranslation = -viewMatrixRightDirection * boundsCenter - viewMatrixUpDirection * boundsCenter - viewMatrixForwardDirect * boundsCenter
It looks like zoom would be configured by the pixelSize parameter. So that would need to be computed based on the image dimensions and bound diameter.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Those are the transformation matrix that I apply for each position:
top
[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]
bottom
[[ 1.0000000e+00 0.0000000e+00 0.0000000e+00]
[ 0.0000000e+00 -1.0000000e+00 -1.2246468e-16]
[ 0.0000000e+00 1.2246468e-16 -1.0000000e+00]]
front
[[ 1.000000e+00 0.000000e+00 0.000000e+00]
[ 0.000000e+00 6.123234e-17 1.000000e+00]
[ 0.000000e+00 -1.000000e+00 6.123234e-17]]
back
[[ 1.000000e+00 0.000000e+00 0.000000e+00]
[ 0.000000e+00 6.123234e-17 -1.000000e+00]
[ 0.000000e+00 1.000000e+00 6.123234e-17]]
left
[[ 6.123234e-17 0.000000e+00 1.000000e+00]
[ 0.000000e+00 1.000000e+00 0.000000e+00]
[-1.000000e+00 0.000000e+00 6.123234e-17]]
right
[[ 6.123234e-17 0.000000e+00 -1.000000e+00]
[ 0.000000e+00 1.000000e+00 0.000000e+00]
[ 1.000000e+00 0.000000e+00 6.123234e-17]]
iso
[[ 0.5 -0.5 0.70710678]
[ 0.85355339 0.14644661 -0.5 ]
[ 0.14644661 0.85355339 0.5 ]]
So, if I want to apply a translation, what I do first is to multiply also the translation matrix for the matrix of the bounding box in the form:
high_x low_x
high_y low_y
high_z low_z
Then I substrate high minus low of echa point, and I divide also each point by -2 to get the translation of x, y, and z. and aI add this column to the view matrix.
This works for almost all cases, but there are cases when this doesn't work and the image that i get is too small for one or all perspectives.
What I've seen is that for a large image with the top of the bounding box in the center of the coordinate axe I take very small pictures in all positions. And for images with one of the dimensions of the bounding box too much larger than the other two, I also get the image very small for two of the perspectives...
My question is fi you know any function to apply to the column of translation of the transformation matrix to emulate the zoom in of the camera in those cases keeping the image framed
The text was updated successfully, but these errors were encountered: