CG for Vision Research - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

CG for Vision Research

Description:

... object, there is no retinal disparity ( F = F' ), i.e., light rays fall on fovea. ... Objects on horopter also has no retinal disparity ( L = R )Radius of ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 40
Provided by: quocv
Category:
Tags: fovea | research | vision

less

Transcript and Presenter's Notes

Title: CG for Vision Research


1
CG for Vision Research
  • Lecture 8
  • Winter Term 05-06
  • Quoc Vuong, Franck Caniard, MPI

2
OpenGL Projections Transformations Graphics
Primitives Textures Lighting Material Properties
Vision Research Viewpoint Effect Structure from X
(Motion, Shading, Stereo) Active
Exploration Navigation
GLUT Window Management Input Devices Event
Loop Timing
Fun/Advanced Modeling Animations Mapping (bumps,
terrains) Physics Simulation Sound (OpenAL)
3
Binocular Vision(Stereopsis)
4
For fixated object, there is no retinal disparity
( F F ), i.e., light rays fall on fovea.
?
FD
FD focal distance IOD interocular distance ?
vergence angle FD IOD / ( 2tan(?) )
F
F
IOD
5
?
F
F
IOD
6
Objects on horopter also has no retinal disparity
( ?L ?R ). Radius of horopter depends on FD
FD
Horopter
?L
?R
P
P
F
F
IOD
7
Crossed (negative) disparity for objects in
front of horopter.
FD
P
P
F
F
IOD
8
Uncrossed (positive) disparity for objects
behind horopter.
FD
P
P
F
F
IOD
9
Positive parallax (Uncrossed)
Zero parallax
Negative parallax (Crossed)
10
Retinal Disparity
  • Horizontal retinal disparity depends on
  • Fusion distance
  • Interocular distance
  • Vergence and accommodation
  • Vertical disparity scales distance
  • Problems to consider
  • Correspondence Problem The extent to which the
    visual system can find corresponding points in
    the 2 retinal images
  • Fusion Limit limit to which observer can fuse 2
    images
  • Perceived depth correlated with (horizontal)
    retinal disparity
  • Can be scaled by vergence angle, vertical
    disparity, size perception, etc.

11
Disparity Motion
  • Disparity spatial displacement of corresponding
    points
  • Motion temporal displacement of corresponding
    points
  • Neurons tuned to both disparity and motion
    signals (Qian)

12
Simulating Disparity Field
  • Projection Method

13
? ?L ?R ?L, ?R in radians
To simplify, assume FD large!
?L
?R
IOD
14
? ?L ?R ?L, ?R in radians uL, uR in screen
units that project to P and P
uL
uR
Projection Plane (monitor screen)
P
?L
?R
P
IOD
15
z
P(x,z)
z depth
uL
uR
Projection Plane
x
D Viewing distance
?L
?R
E IOD/2
16
? ?L ?R
z
P(x,z)
z
uL
uR
x
D
?L
?R
If ( D z ) gtgt ( E x ) then ?L ? ( E x )
/ ( D z ) So can drop tan() to simplify
calculations
E
17
Need to solve for uL and uR using Equivalent
Triangles Left eye ( E x ) / ( D z ) ( E
uL ) / D uL ( Dx Ez ) / ( D z )
? ? uR - uL ( 2Ez ) / ( D z )
z
P(x,z)
z
uL
uR
x
D
?L
?R
E
18
Simulating Disparity Field
  • Camera Methods

19
Toe-In Method
  • Geometrically incorrect as it produces some
    vertical disparities
  • Can still be used (simpler less computational)

http//astronomy.swin.edu.au/pbourke/stereographi
cs/stereorender/
20
Off-Axis Method
  • Geometrically correct No vertical disparity
  • Also called parallel axis asymmetric frustum
    perspective projection

21
Stereo Technology
22
Implementation Issues
  • Ghosting/ Crosstalk
  • When information for one eye seen by other
  • Accommodation and Vergence angle
  • Can lead to conflicts (especially if using a
    screen)
  • Spatial Resolution
  • Stereo acuity 3 arc sec or 1/25000th of an inch
    http//white.stanford.edu/brian/numbers/node1.htm
    l)
  • Pixels are discrete so there will be rounding
    errors larger than stereo-acuity
  • Fusion
  • Fusion limit
  • Negative (in front of screen), positive (behind
    screen) and zero parallax (disparity)

23
Mirror Systems
24
Stereoscope Wheatstone (1838)
25
Active/Passive Viewing Systems
26
True 3D Systems
http//bankslab.berkeley.edu/Projects/StereoDispla
yIntro.html
27
Framebuffer
  • RedBook, Chap. 10

28
Simulated 3D Scene
Point
3D Transformations
Rasterization ? Fragment (color depth)
Texture mapping
Fragment tests
Pixel
(0,0)
Image on screen
29
Framebuffer
  • Buffer Memory storage for a single component
    (e.g., red, green, blue, alpha, depth, etc.)
  • Framebuffer All available buffers on graphics
    card

30
Color buffer
  • Refers to the collection of RED, GREEN, BLUE and
    ALPHA buffers
  • The buffer you actually see!
  • Several type of color buffers (depends on
    graphics card)
  • Front (screen) and back (GL_FRONT, GL_BACK)
  • For front and back, there is also a left and
    right buffer for stereo-capable graphics cards
    (GL_FRONT_LEFT, GL_FRONT_RIGHT)
  • Also auxiliary buffers (GL_AUX0, GL_AUX1, )
  • Need to initialize the type of buffer you want
  • glutInitDisplayMode( GLUT_DOUBLE GLUT_RGBA
    GLUT_STEREO )
  • If double buffering is enabled,
    glutSwapBuffers() swaps front and back buffers

31
Buffer Operations
  • Clear buffers can be a very expensive
    operation!
  • glClear(GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT)
  • Selecting buffers
  • glDrawBuffer(GL_BACK) // Put color in back
    buffer
  • glReadBuffer(GL_AUX1) // Get color data from
    auxiliary 1 buffer
  • Masking buffers
  • glColorMask(GL_TRUE, GL_FALSE, GL_FALSE,
    GL_FALSE)
  • // Only write color to RED channel

32
Buffer Masking
Fragment1 R 200 G 50 B 50 A 255 Depth
3 Coord 210, 250
color
depth
33
Buffer Masking
Fragment1 R 200 G 50 B 50 A 255 Depth
3 Coord 210, 250
color
depth
34
Fragment Tests
  • 7 tests performed sequentially to see if
    fragments makes it into framebuffer (to become a
    pixel!) by comparing value of incoming fragment
    with value in appropriate buffer
  • Scissor Test
  • Alpha Test
  • Stencil Test
  • Depth Test
  • Blending
  • Dithering
  • Logical Operations
  • These tests can be enabled/disabled e.g.
    glEnable(GL_DEPTH_TEST)

35
Depth Test
Fragment1 R 255 G 0 B 0 A 255 Depth 3 Coord
200, 500
color
depth
36
Depth Test
Fragment2 R 200 G 50 B 0 A 255 Depth 8 (gt
3) Coord 200, 500
37
Template Code 5
38
A few clarifications
  • Screen refreshes
  • Use glutPostRedisplay() to force the screen to
    refresh
  • Put the drawing function into the idle callback
  • glutIdleFunc(DrawGLScene)
  • Put glutPostRedisplay() in the idle callback
  • Local variable with same name as global variable
  • Commands within function is affected by value of
    local variable
  • The global variable (with the same name) DOES NOT
    get updated

39
This slide left intentionally blank
Write a Comment
User Comments (0)
About PowerShow.com