Reverse coordinate mapping of object or a point












0












$begingroup$


Mapping Problem diagram/description



The screen size and coordinates (a,b,c,d) are known, and the Area of Interest (AOI) size and coordinates (x,y,w,z) are known.



If an object/coordinate/pixel, xx(1,1) is detected in AOI, how do I find or map the coordinates to xx(2,3)?



Note The AOI size/coordinates, and the location of the object/coordinate/pixel/point, even if changed, should result in the correct mapping of the detected object on the screen.










share|cite|improve this question











$endgroup$

















    0












    $begingroup$


    Mapping Problem diagram/description



    The screen size and coordinates (a,b,c,d) are known, and the Area of Interest (AOI) size and coordinates (x,y,w,z) are known.



    If an object/coordinate/pixel, xx(1,1) is detected in AOI, how do I find or map the coordinates to xx(2,3)?



    Note The AOI size/coordinates, and the location of the object/coordinate/pixel/point, even if changed, should result in the correct mapping of the detected object on the screen.










    share|cite|improve this question











    $endgroup$















      0












      0








      0





      $begingroup$


      Mapping Problem diagram/description



      The screen size and coordinates (a,b,c,d) are known, and the Area of Interest (AOI) size and coordinates (x,y,w,z) are known.



      If an object/coordinate/pixel, xx(1,1) is detected in AOI, how do I find or map the coordinates to xx(2,3)?



      Note The AOI size/coordinates, and the location of the object/coordinate/pixel/point, even if changed, should result in the correct mapping of the detected object on the screen.










      share|cite|improve this question











      $endgroup$




      Mapping Problem diagram/description



      The screen size and coordinates (a,b,c,d) are known, and the Area of Interest (AOI) size and coordinates (x,y,w,z) are known.



      If an object/coordinate/pixel, xx(1,1) is detected in AOI, how do I find or map the coordinates to xx(2,3)?



      Note The AOI size/coordinates, and the location of the object/coordinate/pixel/point, even if changed, should result in the correct mapping of the detected object on the screen.







      geometry






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 2 '18 at 12:24







      Kshitij Dhoble

















      asked Dec 2 '18 at 11:59









      Kshitij DhobleKshitij Dhoble

      32




      32






















          3 Answers
          3






          active

          oldest

          votes


















          0












          $begingroup$

          If the units are the same in both axis systems, the transformation equations is just that of a translation



          $$(x_s,y_s)=(x_a,y_a)+(1,2)$$ (where $(1,2)$ are the coordinates of the top-left corner of the AOI wrt the screen).



          Reciprocally,



          $$(x_a,y_a)=(x_s,y_s)-(1,2).$$






          share|cite|improve this answer









          $endgroup$





















            0












            $begingroup$

            Combine a polar coordinate system with the line slope formula and the line distance formula.



            Or use a land surveying system:



            Any y-coordinate that is South of zero is negative.
            Any x-coordinate that is West of zero is negative.



            Point A is (y1, x1) .
            Point B is (y2, x2) .



            The direction of A to B is:



            InvTan((x2 - x1)/(y2 - y1)) .



            If (x2 - x1) is positive that is East else West.
            If (y2 - y1) is positive that is North else South.
            This procedure allows a quadrant direction to be determined between any two points.



            The distance of A to B is:



            SquareRoot of ((x2 - x1)^2 + (y2 - y1)^2) .



            The combination of direction and distance is a vector but here as an inverse. The coordinates of a point is the location of the point.



            Forwarding a point (or setting a point) from A to B is:



            y2 = y1 + (Cos(Direction) * Distance) .
            x2 = x1 + (Sin(Direction) * Distance) .



            A North direction is a positive value added to y1 else negative.
            An East direction is a positive value added to x1 else negative.






            share|cite|improve this answer











            $endgroup$









            • 1




              $begingroup$
              There is absolutely no reason to use polar coordinates. This adds tons of confusion and complexity.
              $endgroup$
              – Yves Daoust
              Dec 2 '18 at 14:45





















            0












            $begingroup$

            If the area-of-interest is a picture-in-picture feature then it is both scaled and translated.



            Scaling multiplies all coordinates and both x and y coordinates by the same scalar. Scaling just makes the figure bigger or smaller but proportionally the same.



            Translating adds the same x translation value to all x coordinates and adds the same y translation value to all y coordinates. Translating just moves the figure without changing its size.



            Then the inverse operations are obvious.






            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%2f3022554%2freverse-coordinate-mapping-of-object-or-a-point%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0












              $begingroup$

              If the units are the same in both axis systems, the transformation equations is just that of a translation



              $$(x_s,y_s)=(x_a,y_a)+(1,2)$$ (where $(1,2)$ are the coordinates of the top-left corner of the AOI wrt the screen).



              Reciprocally,



              $$(x_a,y_a)=(x_s,y_s)-(1,2).$$






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                If the units are the same in both axis systems, the transformation equations is just that of a translation



                $$(x_s,y_s)=(x_a,y_a)+(1,2)$$ (where $(1,2)$ are the coordinates of the top-left corner of the AOI wrt the screen).



                Reciprocally,



                $$(x_a,y_a)=(x_s,y_s)-(1,2).$$






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  If the units are the same in both axis systems, the transformation equations is just that of a translation



                  $$(x_s,y_s)=(x_a,y_a)+(1,2)$$ (where $(1,2)$ are the coordinates of the top-left corner of the AOI wrt the screen).



                  Reciprocally,



                  $$(x_a,y_a)=(x_s,y_s)-(1,2).$$






                  share|cite|improve this answer









                  $endgroup$



                  If the units are the same in both axis systems, the transformation equations is just that of a translation



                  $$(x_s,y_s)=(x_a,y_a)+(1,2)$$ (where $(1,2)$ are the coordinates of the top-left corner of the AOI wrt the screen).



                  Reciprocally,



                  $$(x_a,y_a)=(x_s,y_s)-(1,2).$$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Dec 2 '18 at 14:49









                  Yves DaoustYves Daoust

                  124k671223




                  124k671223























                      0












                      $begingroup$

                      Combine a polar coordinate system with the line slope formula and the line distance formula.



                      Or use a land surveying system:



                      Any y-coordinate that is South of zero is negative.
                      Any x-coordinate that is West of zero is negative.



                      Point A is (y1, x1) .
                      Point B is (y2, x2) .



                      The direction of A to B is:



                      InvTan((x2 - x1)/(y2 - y1)) .



                      If (x2 - x1) is positive that is East else West.
                      If (y2 - y1) is positive that is North else South.
                      This procedure allows a quadrant direction to be determined between any two points.



                      The distance of A to B is:



                      SquareRoot of ((x2 - x1)^2 + (y2 - y1)^2) .



                      The combination of direction and distance is a vector but here as an inverse. The coordinates of a point is the location of the point.



                      Forwarding a point (or setting a point) from A to B is:



                      y2 = y1 + (Cos(Direction) * Distance) .
                      x2 = x1 + (Sin(Direction) * Distance) .



                      A North direction is a positive value added to y1 else negative.
                      An East direction is a positive value added to x1 else negative.






                      share|cite|improve this answer











                      $endgroup$









                      • 1




                        $begingroup$
                        There is absolutely no reason to use polar coordinates. This adds tons of confusion and complexity.
                        $endgroup$
                        – Yves Daoust
                        Dec 2 '18 at 14:45


















                      0












                      $begingroup$

                      Combine a polar coordinate system with the line slope formula and the line distance formula.



                      Or use a land surveying system:



                      Any y-coordinate that is South of zero is negative.
                      Any x-coordinate that is West of zero is negative.



                      Point A is (y1, x1) .
                      Point B is (y2, x2) .



                      The direction of A to B is:



                      InvTan((x2 - x1)/(y2 - y1)) .



                      If (x2 - x1) is positive that is East else West.
                      If (y2 - y1) is positive that is North else South.
                      This procedure allows a quadrant direction to be determined between any two points.



                      The distance of A to B is:



                      SquareRoot of ((x2 - x1)^2 + (y2 - y1)^2) .



                      The combination of direction and distance is a vector but here as an inverse. The coordinates of a point is the location of the point.



                      Forwarding a point (or setting a point) from A to B is:



                      y2 = y1 + (Cos(Direction) * Distance) .
                      x2 = x1 + (Sin(Direction) * Distance) .



                      A North direction is a positive value added to y1 else negative.
                      An East direction is a positive value added to x1 else negative.






                      share|cite|improve this answer











                      $endgroup$









                      • 1




                        $begingroup$
                        There is absolutely no reason to use polar coordinates. This adds tons of confusion and complexity.
                        $endgroup$
                        – Yves Daoust
                        Dec 2 '18 at 14:45
















                      0












                      0








                      0





                      $begingroup$

                      Combine a polar coordinate system with the line slope formula and the line distance formula.



                      Or use a land surveying system:



                      Any y-coordinate that is South of zero is negative.
                      Any x-coordinate that is West of zero is negative.



                      Point A is (y1, x1) .
                      Point B is (y2, x2) .



                      The direction of A to B is:



                      InvTan((x2 - x1)/(y2 - y1)) .



                      If (x2 - x1) is positive that is East else West.
                      If (y2 - y1) is positive that is North else South.
                      This procedure allows a quadrant direction to be determined between any two points.



                      The distance of A to B is:



                      SquareRoot of ((x2 - x1)^2 + (y2 - y1)^2) .



                      The combination of direction and distance is a vector but here as an inverse. The coordinates of a point is the location of the point.



                      Forwarding a point (or setting a point) from A to B is:



                      y2 = y1 + (Cos(Direction) * Distance) .
                      x2 = x1 + (Sin(Direction) * Distance) .



                      A North direction is a positive value added to y1 else negative.
                      An East direction is a positive value added to x1 else negative.






                      share|cite|improve this answer











                      $endgroup$



                      Combine a polar coordinate system with the line slope formula and the line distance formula.



                      Or use a land surveying system:



                      Any y-coordinate that is South of zero is negative.
                      Any x-coordinate that is West of zero is negative.



                      Point A is (y1, x1) .
                      Point B is (y2, x2) .



                      The direction of A to B is:



                      InvTan((x2 - x1)/(y2 - y1)) .



                      If (x2 - x1) is positive that is East else West.
                      If (y2 - y1) is positive that is North else South.
                      This procedure allows a quadrant direction to be determined between any two points.



                      The distance of A to B is:



                      SquareRoot of ((x2 - x1)^2 + (y2 - y1)^2) .



                      The combination of direction and distance is a vector but here as an inverse. The coordinates of a point is the location of the point.



                      Forwarding a point (or setting a point) from A to B is:



                      y2 = y1 + (Cos(Direction) * Distance) .
                      x2 = x1 + (Sin(Direction) * Distance) .



                      A North direction is a positive value added to y1 else negative.
                      An East direction is a positive value added to x1 else negative.







                      share|cite|improve this answer














                      share|cite|improve this answer



                      share|cite|improve this answer








                      edited Dec 2 '18 at 13:49

























                      answered Dec 2 '18 at 13:43









                      S SpringS Spring

                      1343




                      1343








                      • 1




                        $begingroup$
                        There is absolutely no reason to use polar coordinates. This adds tons of confusion and complexity.
                        $endgroup$
                        – Yves Daoust
                        Dec 2 '18 at 14:45
















                      • 1




                        $begingroup$
                        There is absolutely no reason to use polar coordinates. This adds tons of confusion and complexity.
                        $endgroup$
                        – Yves Daoust
                        Dec 2 '18 at 14:45










                      1




                      1




                      $begingroup$
                      There is absolutely no reason to use polar coordinates. This adds tons of confusion and complexity.
                      $endgroup$
                      – Yves Daoust
                      Dec 2 '18 at 14:45






                      $begingroup$
                      There is absolutely no reason to use polar coordinates. This adds tons of confusion and complexity.
                      $endgroup$
                      – Yves Daoust
                      Dec 2 '18 at 14:45













                      0












                      $begingroup$

                      If the area-of-interest is a picture-in-picture feature then it is both scaled and translated.



                      Scaling multiplies all coordinates and both x and y coordinates by the same scalar. Scaling just makes the figure bigger or smaller but proportionally the same.



                      Translating adds the same x translation value to all x coordinates and adds the same y translation value to all y coordinates. Translating just moves the figure without changing its size.



                      Then the inverse operations are obvious.






                      share|cite|improve this answer









                      $endgroup$


















                        0












                        $begingroup$

                        If the area-of-interest is a picture-in-picture feature then it is both scaled and translated.



                        Scaling multiplies all coordinates and both x and y coordinates by the same scalar. Scaling just makes the figure bigger or smaller but proportionally the same.



                        Translating adds the same x translation value to all x coordinates and adds the same y translation value to all y coordinates. Translating just moves the figure without changing its size.



                        Then the inverse operations are obvious.






                        share|cite|improve this answer









                        $endgroup$
















                          0












                          0








                          0





                          $begingroup$

                          If the area-of-interest is a picture-in-picture feature then it is both scaled and translated.



                          Scaling multiplies all coordinates and both x and y coordinates by the same scalar. Scaling just makes the figure bigger or smaller but proportionally the same.



                          Translating adds the same x translation value to all x coordinates and adds the same y translation value to all y coordinates. Translating just moves the figure without changing its size.



                          Then the inverse operations are obvious.






                          share|cite|improve this answer









                          $endgroup$



                          If the area-of-interest is a picture-in-picture feature then it is both scaled and translated.



                          Scaling multiplies all coordinates and both x and y coordinates by the same scalar. Scaling just makes the figure bigger or smaller but proportionally the same.



                          Translating adds the same x translation value to all x coordinates and adds the same y translation value to all y coordinates. Translating just moves the figure without changing its size.



                          Then the inverse operations are obvious.







                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered Dec 2 '18 at 15:47









                          S SpringS Spring

                          1343




                          1343






























                              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%2f3022554%2freverse-coordinate-mapping-of-object-or-a-point%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

                              Probability when a professor distributes a quiz and homework assignment to a class of n students.

                              Aardman Animations

                              Are they similar matrix