1 / 12

Mathematics of the Simple Camera

Mathematics of the Simple Camera. ©Alexandre Meyer 2002, Anthony Steed 2001-2003. Overview. Simple Camera Scenes with spheres COP on +z COP = Centre Of Projection. Simple Camera (Cross Section). COP = Centre Of Projection. Y. d. y max. Z. -Z. COP. y min. View From the Camera.

hermione
Télécharger la présentation

Mathematics of the Simple Camera

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mathematics of the Simple Camera ©Alexandre Meyer 2002, Anthony Steed 2001-2003

  2. Overview • Simple Camera • Scenes with spheres • COP on +z COP = Centre Of Projection

  3. Simple Camera (Cross Section) COP = Centre Of Projection Y d ymax Z -Z COP ymin

  4. View From the Camera (xmax, ymax) (xmin, ymin)

  5. Forming the Rays • Map screen pixels (M by N window) to points in camera view plane (xmax, ymax) (M-1, N-1) (0,0) (xmin, ymin)

  6. Forming the Rays • Consider pixel i,j • It corresponds to a rectangle width = (xmax-xmin)/M height = (ymax-ymin)/N • Our ray goes through the centre of the pixel • Thus the ray goes through the point (xmin + width*(i+0.5), ymin + height*(j+0.5), 0.0)

  7. Forming the Rays • Thus the ray from the COP through pixel i,j is defined by p(t) = (x(t), y(t), z(t)) = (t*(xmin + width*(i+0.5)), t*(ymin + height*(j+0.5)), d - t*d)

  8. Ray Casting • Intersection of Sphere and line (sphere at origin) • Substitute the ray equation in the sphere equation and solve! • Get an equation in t of the form At2 + 2Bt + C = 0

  9. Ray Casting If B2 – AC < 0 then the ray doesn’t intersect the sphere. If B2 -AC = 0 the ray is tangent to the sphere If B2 – AC > 0 then there are two roots given by t = (-B  (B2 – AC))/A chose the lowest value one (the one closest to the COP)

  10. Ray Casting • Intersection of Sphere and line (general case) • Sphere is centred at (a,b,c) • Translate the start of the ray by (-a,-b,-c) • Proceed as before

  11. The Image - Detection

  12. Conclusions • We can now draw images • Forming rays from the camera • Intersecting those rays with objects (spheres) in the scene • But • No colour – merely binary detection operation • Camera is static - at the moment we must move the objects in front of the camera to be able to see them • Need more interesting scenes!

More Related