Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (21 sloc) 0.868 kB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function thetap = pixelZenithAngle(thetac, fc, up, vp)
% Converts pixel coordinates to zenith angles.
%
% Input parameters:
% - thetac: camera zenith angle (in radians)
% - fc: camera focal length
% - up: x-coordinates of pixels in image
% - vp: y-coordinates of pixels in image
%
% Output parameters:
% - thetap: pixel zenith angle
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function thetap = pixelZenithAngle(thetac, fc, up, vp)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright 2006-2009 Jean-Francois Lalonde
% Carnegie Mellon University
% Do not distribute
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
thetap = acos((sin(thetac).*vp+cos(thetac).*fc)./(fc.^2+up.^2+vp.^2).^(1/2));
Jump to Line
Something went wrong with that request. Please try again.