Understanding perspective transform matrix elements interpretation
$begingroup$
I am representing 3D points (vectors) in the following way:
(* conversion from 3D point, represented by normal list of
coordinates, to matrxi column, suitable for transforms *)
ToColumn[point_] := Transpose[{Append[point, 1]}];
(* conversion from matrix column, representing 3D point, to a list,
representing the same point *)
ToPoint[column_] := Take[Transpose[column/column[[4, 1]]][[1]], 3];
I.e. forth element serves as the scale factor.
(Is this conventional representation and what is the name of it?)
I am representing perspective transform with the following matrix:
PerspectiveXYZ[{x_, y_, z_}] := {
{1, 0, 0, 0},
{0, 1, 0, 0},
{0, 0, 1, 0},
{x, y, z, 0}
};
so that
My question is: what is the sense of transform elements x
, y
and z
?
I drew a cube of 8 points and transformed it with various values of these variables:
And found, that x
and y
controls projection plane orientation, while z
controls both the scale and distance from origin point, while z=1
means projecting into some small region (1?), and that the smaller this value, the bigger is the scale, becoming infinite when z=0
.
Is there any clear geometric interpretation of these values, especially z
? May be they should be substituted with 1/z
or something for better interpretation?
May be my vector model should be changed?
transformation
$endgroup$
|
show 3 more comments
$begingroup$
I am representing 3D points (vectors) in the following way:
(* conversion from 3D point, represented by normal list of
coordinates, to matrxi column, suitable for transforms *)
ToColumn[point_] := Transpose[{Append[point, 1]}];
(* conversion from matrix column, representing 3D point, to a list,
representing the same point *)
ToPoint[column_] := Take[Transpose[column/column[[4, 1]]][[1]], 3];
I.e. forth element serves as the scale factor.
(Is this conventional representation and what is the name of it?)
I am representing perspective transform with the following matrix:
PerspectiveXYZ[{x_, y_, z_}] := {
{1, 0, 0, 0},
{0, 1, 0, 0},
{0, 0, 1, 0},
{x, y, z, 0}
};
so that
My question is: what is the sense of transform elements x
, y
and z
?
I drew a cube of 8 points and transformed it with various values of these variables:
And found, that x
and y
controls projection plane orientation, while z
controls both the scale and distance from origin point, while z=1
means projecting into some small region (1?), and that the smaller this value, the bigger is the scale, becoming infinite when z=0
.
Is there any clear geometric interpretation of these values, especially z
? May be they should be substituted with 1/z
or something for better interpretation?
May be my vector model should be changed?
transformation
$endgroup$
1
$begingroup$
It's a fact that if you use "homogeneous coordinates" then a perspective (or projective) transformation from a (projective) plane to a (projective) plane can be represented by a $3 times 3$ "homogeneous" matrix. This is one reason homogeneous coordinates are useful, though they seem unintuitive at first.
$endgroup$
– littleO
Jun 14 '13 at 10:28
$begingroup$
I am using 4x4 matrices.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 10:36
$begingroup$
But warpPerspective accepts a $3 times 3$ matrix, so why are you using $4 times 4$ matrices? Also, I don't understand exactly what your question is.
$endgroup$
– littleO
Jun 14 '13 at 11:51
$begingroup$
See my update. 3x3 matrix gives the same result (I think) as 4x4 matrix with 3rd row/column excluded / turned to zero. My question is more general.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 11:55
$begingroup$
Thanks. I'm confused now about why the $4 times 4$ matrix isn't invertible, I had thought that it should be. Btw, a decent reference for this stuff is the book Multiple View Geometry in Computer Vision by Hartley and Zisserman.
$endgroup$
– littleO
Jun 14 '13 at 19:43
|
show 3 more comments
$begingroup$
I am representing 3D points (vectors) in the following way:
(* conversion from 3D point, represented by normal list of
coordinates, to matrxi column, suitable for transforms *)
ToColumn[point_] := Transpose[{Append[point, 1]}];
(* conversion from matrix column, representing 3D point, to a list,
representing the same point *)
ToPoint[column_] := Take[Transpose[column/column[[4, 1]]][[1]], 3];
I.e. forth element serves as the scale factor.
(Is this conventional representation and what is the name of it?)
I am representing perspective transform with the following matrix:
PerspectiveXYZ[{x_, y_, z_}] := {
{1, 0, 0, 0},
{0, 1, 0, 0},
{0, 0, 1, 0},
{x, y, z, 0}
};
so that
My question is: what is the sense of transform elements x
, y
and z
?
I drew a cube of 8 points and transformed it with various values of these variables:
And found, that x
and y
controls projection plane orientation, while z
controls both the scale and distance from origin point, while z=1
means projecting into some small region (1?), and that the smaller this value, the bigger is the scale, becoming infinite when z=0
.
Is there any clear geometric interpretation of these values, especially z
? May be they should be substituted with 1/z
or something for better interpretation?
May be my vector model should be changed?
transformation
$endgroup$
I am representing 3D points (vectors) in the following way:
(* conversion from 3D point, represented by normal list of
coordinates, to matrxi column, suitable for transforms *)
ToColumn[point_] := Transpose[{Append[point, 1]}];
(* conversion from matrix column, representing 3D point, to a list,
representing the same point *)
ToPoint[column_] := Take[Transpose[column/column[[4, 1]]][[1]], 3];
I.e. forth element serves as the scale factor.
(Is this conventional representation and what is the name of it?)
I am representing perspective transform with the following matrix:
PerspectiveXYZ[{x_, y_, z_}] := {
{1, 0, 0, 0},
{0, 1, 0, 0},
{0, 0, 1, 0},
{x, y, z, 0}
};
so that
My question is: what is the sense of transform elements x
, y
and z
?
I drew a cube of 8 points and transformed it with various values of these variables:
And found, that x
and y
controls projection plane orientation, while z
controls both the scale and distance from origin point, while z=1
means projecting into some small region (1?), and that the smaller this value, the bigger is the scale, becoming infinite when z=0
.
Is there any clear geometric interpretation of these values, especially z
? May be they should be substituted with 1/z
or something for better interpretation?
May be my vector model should be changed?
transformation
transformation
edited Jun 14 '13 at 11:54
Suzan Cioc
asked Jun 14 '13 at 9:09
Suzan CiocSuzan Cioc
401621
401621
1
$begingroup$
It's a fact that if you use "homogeneous coordinates" then a perspective (or projective) transformation from a (projective) plane to a (projective) plane can be represented by a $3 times 3$ "homogeneous" matrix. This is one reason homogeneous coordinates are useful, though they seem unintuitive at first.
$endgroup$
– littleO
Jun 14 '13 at 10:28
$begingroup$
I am using 4x4 matrices.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 10:36
$begingroup$
But warpPerspective accepts a $3 times 3$ matrix, so why are you using $4 times 4$ matrices? Also, I don't understand exactly what your question is.
$endgroup$
– littleO
Jun 14 '13 at 11:51
$begingroup$
See my update. 3x3 matrix gives the same result (I think) as 4x4 matrix with 3rd row/column excluded / turned to zero. My question is more general.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 11:55
$begingroup$
Thanks. I'm confused now about why the $4 times 4$ matrix isn't invertible, I had thought that it should be. Btw, a decent reference for this stuff is the book Multiple View Geometry in Computer Vision by Hartley and Zisserman.
$endgroup$
– littleO
Jun 14 '13 at 19:43
|
show 3 more comments
1
$begingroup$
It's a fact that if you use "homogeneous coordinates" then a perspective (or projective) transformation from a (projective) plane to a (projective) plane can be represented by a $3 times 3$ "homogeneous" matrix. This is one reason homogeneous coordinates are useful, though they seem unintuitive at first.
$endgroup$
– littleO
Jun 14 '13 at 10:28
$begingroup$
I am using 4x4 matrices.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 10:36
$begingroup$
But warpPerspective accepts a $3 times 3$ matrix, so why are you using $4 times 4$ matrices? Also, I don't understand exactly what your question is.
$endgroup$
– littleO
Jun 14 '13 at 11:51
$begingroup$
See my update. 3x3 matrix gives the same result (I think) as 4x4 matrix with 3rd row/column excluded / turned to zero. My question is more general.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 11:55
$begingroup$
Thanks. I'm confused now about why the $4 times 4$ matrix isn't invertible, I had thought that it should be. Btw, a decent reference for this stuff is the book Multiple View Geometry in Computer Vision by Hartley and Zisserman.
$endgroup$
– littleO
Jun 14 '13 at 19:43
1
1
$begingroup$
It's a fact that if you use "homogeneous coordinates" then a perspective (or projective) transformation from a (projective) plane to a (projective) plane can be represented by a $3 times 3$ "homogeneous" matrix. This is one reason homogeneous coordinates are useful, though they seem unintuitive at first.
$endgroup$
– littleO
Jun 14 '13 at 10:28
$begingroup$
It's a fact that if you use "homogeneous coordinates" then a perspective (or projective) transformation from a (projective) plane to a (projective) plane can be represented by a $3 times 3$ "homogeneous" matrix. This is one reason homogeneous coordinates are useful, though they seem unintuitive at first.
$endgroup$
– littleO
Jun 14 '13 at 10:28
$begingroup$
I am using 4x4 matrices.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 10:36
$begingroup$
I am using 4x4 matrices.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 10:36
$begingroup$
But warpPerspective accepts a $3 times 3$ matrix, so why are you using $4 times 4$ matrices? Also, I don't understand exactly what your question is.
$endgroup$
– littleO
Jun 14 '13 at 11:51
$begingroup$
But warpPerspective accepts a $3 times 3$ matrix, so why are you using $4 times 4$ matrices? Also, I don't understand exactly what your question is.
$endgroup$
– littleO
Jun 14 '13 at 11:51
$begingroup$
See my update. 3x3 matrix gives the same result (I think) as 4x4 matrix with 3rd row/column excluded / turned to zero. My question is more general.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 11:55
$begingroup$
See my update. 3x3 matrix gives the same result (I think) as 4x4 matrix with 3rd row/column excluded / turned to zero. My question is more general.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 11:55
$begingroup$
Thanks. I'm confused now about why the $4 times 4$ matrix isn't invertible, I had thought that it should be. Btw, a decent reference for this stuff is the book Multiple View Geometry in Computer Vision by Hartley and Zisserman.
$endgroup$
– littleO
Jun 14 '13 at 19:43
$begingroup$
Thanks. I'm confused now about why the $4 times 4$ matrix isn't invertible, I had thought that it should be. Btw, a decent reference for this stuff is the book Multiple View Geometry in Computer Vision by Hartley and Zisserman.
$endgroup$
– littleO
Jun 14 '13 at 19:43
|
show 3 more comments
1 Answer
1
active
oldest
votes
$begingroup$
The matrix
defines a perspective projection onto the plane with equation
$Ax + By + Cz + D=0$
Perspective is build with the center in the origin.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f420131%2funderstanding-perspective-transform-matrix-elements-interpretation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The matrix
defines a perspective projection onto the plane with equation
$Ax + By + Cz + D=0$
Perspective is build with the center in the origin.
$endgroup$
add a comment |
$begingroup$
The matrix
defines a perspective projection onto the plane with equation
$Ax + By + Cz + D=0$
Perspective is build with the center in the origin.
$endgroup$
add a comment |
$begingroup$
The matrix
defines a perspective projection onto the plane with equation
$Ax + By + Cz + D=0$
Perspective is build with the center in the origin.
$endgroup$
The matrix
defines a perspective projection onto the plane with equation
$Ax + By + Cz + D=0$
Perspective is build with the center in the origin.
answered Jun 14 '13 at 22:09
Suzan CiocSuzan Cioc
401621
401621
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f420131%2funderstanding-perspective-transform-matrix-elements-interpretation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
It's a fact that if you use "homogeneous coordinates" then a perspective (or projective) transformation from a (projective) plane to a (projective) plane can be represented by a $3 times 3$ "homogeneous" matrix. This is one reason homogeneous coordinates are useful, though they seem unintuitive at first.
$endgroup$
– littleO
Jun 14 '13 at 10:28
$begingroup$
I am using 4x4 matrices.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 10:36
$begingroup$
But warpPerspective accepts a $3 times 3$ matrix, so why are you using $4 times 4$ matrices? Also, I don't understand exactly what your question is.
$endgroup$
– littleO
Jun 14 '13 at 11:51
$begingroup$
See my update. 3x3 matrix gives the same result (I think) as 4x4 matrix with 3rd row/column excluded / turned to zero. My question is more general.
$endgroup$
– Suzan Cioc
Jun 14 '13 at 11:55
$begingroup$
Thanks. I'm confused now about why the $4 times 4$ matrix isn't invertible, I had thought that it should be. Btw, a decent reference for this stuff is the book Multiple View Geometry in Computer Vision by Hartley and Zisserman.
$endgroup$
– littleO
Jun 14 '13 at 19:43