0
$\begingroup$

My program needs to compute the angle of a pixel from a computer vision camera that has 120 degrees horizontal field of view, and resolution of 640 pixels wide and 480 pixels high.

Program receives an X,Y array of pixels for each image frame from camera. For left-most pixel, X would be 0 and angle would be -60 degrees. For right-most pixel, X would be 639 and angle 60 degrees. For center pixel, X would be 320 and angle 0.

How is angle computed when (X is > 0 and < 320) and (>320 and <640)?

$\endgroup$

migrated from mathematica.stackexchange.com Sep 11 '15 at 17:44

This question came from our site for users of Wolfram Mathematica.

  • 2
    $\begingroup$ Is this related with the software product Mathematica(TM)? This site is about it! $\endgroup$ – Dr. belisarius Sep 11 '15 at 13:52
  • $\begingroup$ Check this: stackoverflow.com/questions/17499409/… $\endgroup$ – Hubble07 Sep 11 '15 at 16:13
  • $\begingroup$ If the lens has a stated angle-of-view of 120 degrees, that generally refers the angle-of-view across a diagonal of the image frame and not the horizontal angle-of-view. The horizontal angle-of-view will be 80% of that (96 degrees). Similarly, the vertical angle-of-view will be 60% of that (72 degrees). $\endgroup$ – m_goldberg Sep 11 '15 at 17:14
  • $\begingroup$ 120 degrees horizontal field of view $\endgroup$ – Doug Null Sep 11 '15 at 19:00
  • $\begingroup$ With a field of view that wide there's bound to be noticeable distortion. I would use opencv's camera calibration utility to get the distortion parameters along with the projection matrix. $\endgroup$ – 2012rcampion Sep 11 '15 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.