Find normal vector of circle in 3D space given circle size and a single perspective












4












$begingroup$


I don't really know what to search up to answer my question. I tried such things as "ellipse matching" and "3d circle orientation" (and others) but I can't really find much. But anyways...



I have this camera tracking a circle in 3d space. All it can see is a skewed and distorted version of that circle. The computer knows the exact size of that circle (like it's radius). The computer can calculate the smallest rectangle (with edges completely horizontal) and find the four points on the rectangle (one point per side) at which the distorted circle touches that rectangle.



How would I go about finding the orientation of the circle? (the direction of the normal vector of the circle).



Some thoughts I have had that the center of the circle must be at the intersection of the diagonals of the rectangle. Is that true to say? And where would I go after this. If someone can help me find a website that explains this instead, that would also be helpful.



EDIT:
You also know the angle at which the center of this rectangle is from the camera.



An image would look something like this:
enter image description here










share|cite|improve this question











$endgroup$












  • $begingroup$
    Due to perspective, the center of the circle generally does not project on the center of the ellipse.
    $endgroup$
    – Yves Daoust
    May 7 '14 at 21:33
















4












$begingroup$


I don't really know what to search up to answer my question. I tried such things as "ellipse matching" and "3d circle orientation" (and others) but I can't really find much. But anyways...



I have this camera tracking a circle in 3d space. All it can see is a skewed and distorted version of that circle. The computer knows the exact size of that circle (like it's radius). The computer can calculate the smallest rectangle (with edges completely horizontal) and find the four points on the rectangle (one point per side) at which the distorted circle touches that rectangle.



How would I go about finding the orientation of the circle? (the direction of the normal vector of the circle).



Some thoughts I have had that the center of the circle must be at the intersection of the diagonals of the rectangle. Is that true to say? And where would I go after this. If someone can help me find a website that explains this instead, that would also be helpful.



EDIT:
You also know the angle at which the center of this rectangle is from the camera.



An image would look something like this:
enter image description here










share|cite|improve this question











$endgroup$












  • $begingroup$
    Due to perspective, the center of the circle generally does not project on the center of the ellipse.
    $endgroup$
    – Yves Daoust
    May 7 '14 at 21:33














4












4








4


1



$begingroup$


I don't really know what to search up to answer my question. I tried such things as "ellipse matching" and "3d circle orientation" (and others) but I can't really find much. But anyways...



I have this camera tracking a circle in 3d space. All it can see is a skewed and distorted version of that circle. The computer knows the exact size of that circle (like it's radius). The computer can calculate the smallest rectangle (with edges completely horizontal) and find the four points on the rectangle (one point per side) at which the distorted circle touches that rectangle.



How would I go about finding the orientation of the circle? (the direction of the normal vector of the circle).



Some thoughts I have had that the center of the circle must be at the intersection of the diagonals of the rectangle. Is that true to say? And where would I go after this. If someone can help me find a website that explains this instead, that would also be helpful.



EDIT:
You also know the angle at which the center of this rectangle is from the camera.



An image would look something like this:
enter image description here










share|cite|improve this question











$endgroup$




I don't really know what to search up to answer my question. I tried such things as "ellipse matching" and "3d circle orientation" (and others) but I can't really find much. But anyways...



I have this camera tracking a circle in 3d space. All it can see is a skewed and distorted version of that circle. The computer knows the exact size of that circle (like it's radius). The computer can calculate the smallest rectangle (with edges completely horizontal) and find the four points on the rectangle (one point per side) at which the distorted circle touches that rectangle.



How would I go about finding the orientation of the circle? (the direction of the normal vector of the circle).



Some thoughts I have had that the center of the circle must be at the intersection of the diagonals of the rectangle. Is that true to say? And where would I go after this. If someone can help me find a website that explains this instead, that would also be helpful.



EDIT:
You also know the angle at which the center of this rectangle is from the camera.



An image would look something like this:
enter image description here







vector-spaces circles 3d






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Apr 28 '14 at 18:18







Sidd Singal

















asked Apr 28 '14 at 18:06









Sidd SingalSidd Singal

2,58231630




2,58231630












  • $begingroup$
    Due to perspective, the center of the circle generally does not project on the center of the ellipse.
    $endgroup$
    – Yves Daoust
    May 7 '14 at 21:33


















  • $begingroup$
    Due to perspective, the center of the circle generally does not project on the center of the ellipse.
    $endgroup$
    – Yves Daoust
    May 7 '14 at 21:33
















$begingroup$
Due to perspective, the center of the circle generally does not project on the center of the ellipse.
$endgroup$
– Yves Daoust
May 7 '14 at 21:33




$begingroup$
Due to perspective, the center of the circle generally does not project on the center of the ellipse.
$endgroup$
– Yves Daoust
May 7 '14 at 21:33










1 Answer
1






active

oldest

votes


















0












$begingroup$

let's start by assuming your camera has no perspective distortion (which of course isn't true) - so in other words, assuming we have an orthogonal perspective:



So you know the radius of the circle, and you know the four points where the circle touches the rectangle, plus you can get the center by connecting the diagonals of the rectangle (this is true if you have no perspective distortion since the center of the ellipse is equally placed between top and bottom, and side-to-side). So this is what you have.



What we need are two points on the edge of the circle, the center point, and the radius. And then this is what you do (let's say the camera view is of the $yz$ plane):





  1. You have point 1: $p_1=(x_1,a_1,b_1)$ where $x_1$ is unknown and $a_1,b_1$ is known (calculated by computer from where it touches the rectangle)...and similarly you have point 2: $p_2=(x_2,a_2,b_2)$.

  2. Then you have the center point: $p_c=(0,a_c,b_c)$ (since we have no depth information we arbitrarily place the $yz$ plane at the center of the circle)

  3. Now we must have $|p_1-p_c|^2=r^2=x_1^2+(a_1-a_c)^2+(b_1-b_c)^2$ from which you can calculate the absolute value of $x_1$ and similarly $|p_2-p_c|^2=r^2=x_2^2+(a_2-a_c)^2+(b_2-b_c)^2$ from which you can calculate the absolute value of $x_2$.

  4. So now the trick comes in that you have to determine if $x_1$ and $x_2$ should be positive or negative. If you choose $p_1,p_2$ so that they are opposite (in the sense that they have inverse coordinates about the center: $a_1-a_c=a_c-a_2$, $b_1-b_c=b_c-b_2$) then $x_1$ and $x_2$ should have the same absolute value, but opposite signs...so only two possibilities, so maybe some trial and error here, but let's assume you can correctly determine whether $x_1,x_2$ is closer to the camera than the center or further away.

  5. Then you have two vectors $v_1=(x_1,a_1-a_c,b_1-b_c)$ and $v_2=(x_2,a_2-a_c,b_2-b_c)$ and taking the cross product of these vectors you will have a vector which is normal to the circle.




So then the next step is to correct for camera perspective - maybe something like this can be a start?: https://stackoverflow.com/questions/1194352/proportions-of-a-perspective-deformed-rectangle






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%2f773126%2ffind-normal-vector-of-circle-in-3d-space-given-circle-size-and-a-single-perspect%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$

    let's start by assuming your camera has no perspective distortion (which of course isn't true) - so in other words, assuming we have an orthogonal perspective:



    So you know the radius of the circle, and you know the four points where the circle touches the rectangle, plus you can get the center by connecting the diagonals of the rectangle (this is true if you have no perspective distortion since the center of the ellipse is equally placed between top and bottom, and side-to-side). So this is what you have.



    What we need are two points on the edge of the circle, the center point, and the radius. And then this is what you do (let's say the camera view is of the $yz$ plane):





    1. You have point 1: $p_1=(x_1,a_1,b_1)$ where $x_1$ is unknown and $a_1,b_1$ is known (calculated by computer from where it touches the rectangle)...and similarly you have point 2: $p_2=(x_2,a_2,b_2)$.

    2. Then you have the center point: $p_c=(0,a_c,b_c)$ (since we have no depth information we arbitrarily place the $yz$ plane at the center of the circle)

    3. Now we must have $|p_1-p_c|^2=r^2=x_1^2+(a_1-a_c)^2+(b_1-b_c)^2$ from which you can calculate the absolute value of $x_1$ and similarly $|p_2-p_c|^2=r^2=x_2^2+(a_2-a_c)^2+(b_2-b_c)^2$ from which you can calculate the absolute value of $x_2$.

    4. So now the trick comes in that you have to determine if $x_1$ and $x_2$ should be positive or negative. If you choose $p_1,p_2$ so that they are opposite (in the sense that they have inverse coordinates about the center: $a_1-a_c=a_c-a_2$, $b_1-b_c=b_c-b_2$) then $x_1$ and $x_2$ should have the same absolute value, but opposite signs...so only two possibilities, so maybe some trial and error here, but let's assume you can correctly determine whether $x_1,x_2$ is closer to the camera than the center or further away.

    5. Then you have two vectors $v_1=(x_1,a_1-a_c,b_1-b_c)$ and $v_2=(x_2,a_2-a_c,b_2-b_c)$ and taking the cross product of these vectors you will have a vector which is normal to the circle.




    So then the next step is to correct for camera perspective - maybe something like this can be a start?: https://stackoverflow.com/questions/1194352/proportions-of-a-perspective-deformed-rectangle






    share|cite|improve this answer











    $endgroup$


















      0












      $begingroup$

      let's start by assuming your camera has no perspective distortion (which of course isn't true) - so in other words, assuming we have an orthogonal perspective:



      So you know the radius of the circle, and you know the four points where the circle touches the rectangle, plus you can get the center by connecting the diagonals of the rectangle (this is true if you have no perspective distortion since the center of the ellipse is equally placed between top and bottom, and side-to-side). So this is what you have.



      What we need are two points on the edge of the circle, the center point, and the radius. And then this is what you do (let's say the camera view is of the $yz$ plane):





      1. You have point 1: $p_1=(x_1,a_1,b_1)$ where $x_1$ is unknown and $a_1,b_1$ is known (calculated by computer from where it touches the rectangle)...and similarly you have point 2: $p_2=(x_2,a_2,b_2)$.

      2. Then you have the center point: $p_c=(0,a_c,b_c)$ (since we have no depth information we arbitrarily place the $yz$ plane at the center of the circle)

      3. Now we must have $|p_1-p_c|^2=r^2=x_1^2+(a_1-a_c)^2+(b_1-b_c)^2$ from which you can calculate the absolute value of $x_1$ and similarly $|p_2-p_c|^2=r^2=x_2^2+(a_2-a_c)^2+(b_2-b_c)^2$ from which you can calculate the absolute value of $x_2$.

      4. So now the trick comes in that you have to determine if $x_1$ and $x_2$ should be positive or negative. If you choose $p_1,p_2$ so that they are opposite (in the sense that they have inverse coordinates about the center: $a_1-a_c=a_c-a_2$, $b_1-b_c=b_c-b_2$) then $x_1$ and $x_2$ should have the same absolute value, but opposite signs...so only two possibilities, so maybe some trial and error here, but let's assume you can correctly determine whether $x_1,x_2$ is closer to the camera than the center or further away.

      5. Then you have two vectors $v_1=(x_1,a_1-a_c,b_1-b_c)$ and $v_2=(x_2,a_2-a_c,b_2-b_c)$ and taking the cross product of these vectors you will have a vector which is normal to the circle.




      So then the next step is to correct for camera perspective - maybe something like this can be a start?: https://stackoverflow.com/questions/1194352/proportions-of-a-perspective-deformed-rectangle






      share|cite|improve this answer











      $endgroup$
















        0












        0








        0





        $begingroup$

        let's start by assuming your camera has no perspective distortion (which of course isn't true) - so in other words, assuming we have an orthogonal perspective:



        So you know the radius of the circle, and you know the four points where the circle touches the rectangle, plus you can get the center by connecting the diagonals of the rectangle (this is true if you have no perspective distortion since the center of the ellipse is equally placed between top and bottom, and side-to-side). So this is what you have.



        What we need are two points on the edge of the circle, the center point, and the radius. And then this is what you do (let's say the camera view is of the $yz$ plane):





        1. You have point 1: $p_1=(x_1,a_1,b_1)$ where $x_1$ is unknown and $a_1,b_1$ is known (calculated by computer from where it touches the rectangle)...and similarly you have point 2: $p_2=(x_2,a_2,b_2)$.

        2. Then you have the center point: $p_c=(0,a_c,b_c)$ (since we have no depth information we arbitrarily place the $yz$ plane at the center of the circle)

        3. Now we must have $|p_1-p_c|^2=r^2=x_1^2+(a_1-a_c)^2+(b_1-b_c)^2$ from which you can calculate the absolute value of $x_1$ and similarly $|p_2-p_c|^2=r^2=x_2^2+(a_2-a_c)^2+(b_2-b_c)^2$ from which you can calculate the absolute value of $x_2$.

        4. So now the trick comes in that you have to determine if $x_1$ and $x_2$ should be positive or negative. If you choose $p_1,p_2$ so that they are opposite (in the sense that they have inverse coordinates about the center: $a_1-a_c=a_c-a_2$, $b_1-b_c=b_c-b_2$) then $x_1$ and $x_2$ should have the same absolute value, but opposite signs...so only two possibilities, so maybe some trial and error here, but let's assume you can correctly determine whether $x_1,x_2$ is closer to the camera than the center or further away.

        5. Then you have two vectors $v_1=(x_1,a_1-a_c,b_1-b_c)$ and $v_2=(x_2,a_2-a_c,b_2-b_c)$ and taking the cross product of these vectors you will have a vector which is normal to the circle.




        So then the next step is to correct for camera perspective - maybe something like this can be a start?: https://stackoverflow.com/questions/1194352/proportions-of-a-perspective-deformed-rectangle






        share|cite|improve this answer











        $endgroup$



        let's start by assuming your camera has no perspective distortion (which of course isn't true) - so in other words, assuming we have an orthogonal perspective:



        So you know the radius of the circle, and you know the four points where the circle touches the rectangle, plus you can get the center by connecting the diagonals of the rectangle (this is true if you have no perspective distortion since the center of the ellipse is equally placed between top and bottom, and side-to-side). So this is what you have.



        What we need are two points on the edge of the circle, the center point, and the radius. And then this is what you do (let's say the camera view is of the $yz$ plane):





        1. You have point 1: $p_1=(x_1,a_1,b_1)$ where $x_1$ is unknown and $a_1,b_1$ is known (calculated by computer from where it touches the rectangle)...and similarly you have point 2: $p_2=(x_2,a_2,b_2)$.

        2. Then you have the center point: $p_c=(0,a_c,b_c)$ (since we have no depth information we arbitrarily place the $yz$ plane at the center of the circle)

        3. Now we must have $|p_1-p_c|^2=r^2=x_1^2+(a_1-a_c)^2+(b_1-b_c)^2$ from which you can calculate the absolute value of $x_1$ and similarly $|p_2-p_c|^2=r^2=x_2^2+(a_2-a_c)^2+(b_2-b_c)^2$ from which you can calculate the absolute value of $x_2$.

        4. So now the trick comes in that you have to determine if $x_1$ and $x_2$ should be positive or negative. If you choose $p_1,p_2$ so that they are opposite (in the sense that they have inverse coordinates about the center: $a_1-a_c=a_c-a_2$, $b_1-b_c=b_c-b_2$) then $x_1$ and $x_2$ should have the same absolute value, but opposite signs...so only two possibilities, so maybe some trial and error here, but let's assume you can correctly determine whether $x_1,x_2$ is closer to the camera than the center or further away.

        5. Then you have two vectors $v_1=(x_1,a_1-a_c,b_1-b_c)$ and $v_2=(x_2,a_2-a_c,b_2-b_c)$ and taking the cross product of these vectors you will have a vector which is normal to the circle.




        So then the next step is to correct for camera perspective - maybe something like this can be a start?: https://stackoverflow.com/questions/1194352/proportions-of-a-perspective-deformed-rectangle







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited May 23 '17 at 12:39









        Community

        1




        1










        answered May 6 '14 at 19:55









        Christiaan HattinghChristiaan Hattingh

        3,867922




        3,867922






























            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%2f773126%2ffind-normal-vector-of-circle-in-3d-space-given-circle-size-and-a-single-perspect%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...