Understanding perspective transform matrix elements interpretation












2












$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]}];


enter image description here



(* conversion from matrix column, representing 3D point, to a list, 
representing the same point *)
ToPoint[column_] := Take[Transpose[column/column[[4, 1]]][[1]], 3];


enter image description here



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



enter image description here



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:



enter image description here



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?










share|cite|improve this question











$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


















2












$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]}];


enter image description here



(* conversion from matrix column, representing 3D point, to a list, 
representing the same point *)
ToPoint[column_] := Take[Transpose[column/column[[4, 1]]][[1]], 3];


enter image description here



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



enter image description here



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:



enter image description here



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?










share|cite|improve this question











$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
















2












2








2


1



$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]}];


enter image description here



(* conversion from matrix column, representing 3D point, to a list, 
representing the same point *)
ToPoint[column_] := Take[Transpose[column/column[[4, 1]]][[1]], 3];


enter image description here



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



enter image description here



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:



enter image description here



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?










share|cite|improve this question











$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]}];


enter image description here



(* conversion from matrix column, representing 3D point, to a list, 
representing the same point *)
ToPoint[column_] := Take[Transpose[column/column[[4, 1]]][[1]], 3];


enter image description here



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



enter image description here



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:



enter image description here



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






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








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
















  • 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












1 Answer
1






active

oldest

votes


















0












$begingroup$

The matrix



enter image description here



defines a perspective projection onto the plane with equation



$Ax + By + Cz + D=0$



Perspective is build with the center in the origin.






share|cite|improve this answer









$endgroup$













    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    0












    $begingroup$

    The matrix



    enter image description here



    defines a perspective projection onto the plane with equation



    $Ax + By + Cz + D=0$



    Perspective is build with the center in the origin.






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      The matrix



      enter image description here



      defines a perspective projection onto the plane with equation



      $Ax + By + Cz + D=0$



      Perspective is build with the center in the origin.






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        The matrix



        enter image description here



        defines a perspective projection onto the plane with equation



        $Ax + By + Cz + D=0$



        Perspective is build with the center in the origin.






        share|cite|improve this answer









        $endgroup$



        The matrix



        enter image description here



        defines a perspective projection onto the plane with equation



        $Ax + By + Cz + D=0$



        Perspective is build with the center in the origin.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jun 14 '13 at 22:09









        Suzan CiocSuzan Cioc

        401621




        401621






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...