Image Correction: The How-to and Notes

 

This document contains operating instructions for using the image correction currently present in Guppy3D.

Keyboard Commands

 

W

(Shift – w)

Toggles the mesh display on and off.  If using GPU warping, toggling the mesh display off generates a new displacement map.

D

(Shift – d)

Toggles warping on and off.  If using GPU warping, the displacement map must first be generated before warping will work.

M

(Shift – m)

Generates a displacement map without closing the interface.

r

 

Reset selected vertex to original position.

R

(Shift – r)

Resets the whole mesh to original orientation.

,

(comma)

Rotates the ‘up’ angle.

.

(period)

Rotates the ‘up’ angle in the opposite direction.

←↑→↓

(arrow keys)

Used for fine adjustments.  After clicking on a vertex to select it, use the arrow keys to slightly nudge the vertex.

Using the Image Correction

 

Press ‘W’ (Shift – w) to call up the mesh display interface.  The green arrow in the middle shows the “up” orientation of the facet.  Using the period and comma keys, rotate the arrow until it points in the appropriate upwards direction.  Now, mouse motion and key motion will be in a more natural orientation.

 

First, position the corners of the mesh to line up with the corners of the facet by left-click-dragging the mouse on the appropriate corner vertices.  After those are aligned, adjust the points on the edge starting from the middle and working towards the corners.  Repeat as needed.

Notes

 

There are two major options for compiling the image correction, with GPU support or without.  This is determined in guppy3D/src/include/compile_options.h.  To compile with GPU support, make sure the line #define GPU_ENABLED  is not commented out.  Additionally, the libraries for CG must be linked.  The makefile in guppy3D/src/ contains the line –lCg –lCgGl.  This line should be uncommented.  If it is not, the cg calls will be undefined during linking. 

 

The code for the image correction is essentially the same on both the new 5-machine and the old 8-machine setup.  There are some minor differences, however.  The old machines have graphics cards that do not support the GPU operations that we require.  Since the cards do not support rectangular textures, the code is altered slightly to utilize square power-of-two textures.