home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
vis-ftp.cs.umass.edu
/
vis-ftp.cs.umass.edu.tar
/
vis-ftp.cs.umass.edu
/
pub
/
Software
/
ASCENDER
/
ascendMar8.tar
/
UMass
/
Epipolar
/
epiproj-rcde.lisp
< prev
next >
Wrap
Lisp/Scheme
|
1995-07-20
|
1KB
|
36 lines
;;; EPIPROJ-RCDE.LISP
;;;
;;; Forward and backward projection using RCDE projection facilities
;;;
;;; Author: Robert T. Collins
;;; Date: Mar 1, 1995
;;; based on my earlier epipolar.lisp, written Dec 28, 1993
;;;
;-----------------------------------------------------------------
; (c) Copyright 1995 by The University of Massachusetts
;------------------------------------------------------------------
(in-package 'epipolar :nicknames '(epi))
(defun project-point (projection x y z)
"Projects 3D world point x y z into image plane u v."
(multiple-value-bind (u v)
(cme::project-to-view
projection
(coerce x 'double-float)
(coerce y 'double-float)
(coerce z 'double-float))
(list u v)))
(defun backproject-point (projection u v zval)
"Backproject image point u v and return the 3d point where
the backprojection ray intersects the plane z = zval."
(multiple-value-bind (x y z)
(cme::project-to-world
projection
(coerce u 'double-float)
(coerce v 'double-float)
(coerce zval 'double-float))
(list x y z)))