Range Image Generator 

Mike Patterson

March 15, 2005

CPE � 570Q 

 

Abstract:

This program takes in a sequence of 2D images acquired from a structured light scanner I�ve been developing and generates a dense 3D point cloud.The depth is derived from the weighted difference in x between a pixel in the projected slide and its corresponding pixel in the camera image, a na�ve but effective method.Correspondence is found by generating a lookup table from the projected slides � a temporal, binary encoding of each pixel position.The lookup key is then generated for each pixel position from the camera images and used to find the corresponding pixel in the projector�s image space.

 

 

Download final.zip (56.2 MB).

 

usage:���������� Final -pPATH -uXXXXXXXX -b# -w# <-f# -l# || -s#> [additional flags]

 

example:����� Final -ptiger -f1 -l1 -u0079837F -w29 -b30 -e.png

 

Flags:

-b#

specify the all black reference image (# is the image file number)

 

 

-eEXT

specify the extension of the source images (.bmp is the default) where (EXT = .bmp).Note the explicit use of the period.

 

 

-f#

specify the first image set to use (# is the image set number)

 

 

-l#

specify the last image set to use (# is the image set number)

 

 

-o

write the opened image sets to the mri folder in the following format (x, y and z are floats; r, g and b are unsigned chars):

 

������������

 

��������������� height width

 

��������������� x y z r g b

 

�������������������������������������������� <---- Blank lines indicate invalid pixel

 

��������������� x y z r g b

 

��������������� .

 

��������������� .

 

��������������� .

 

 

-pPATH

specify where the image sets for the object are stored. For example, -ptiger , refers to "data/tiger".

 

������������

-s#

specify one image set to use (# is the zero based set number)

 

 

-uXXXXXXXX

specify which images in an image set to use for depth calculation. XXXXXXXX represents 32 bit flags in hex where an asserted bit means use the corresponding slide and object image.

 

�� 000000A5 uses slides {1, 3, 6, 8} and object images {0, 2, 5, 7}

 

�� 0079837F yields fast/good results with the included data set.

 

 

-w#

specify the all white reference image (# is the zero based file number)

 

Check out the shortcuts "Final 01", "Final 01-02" and "Final Use and Show ALL" for examples.WARNING: "Final Use and Show ALL" takes a while to load.

 

Object Image Sets (numbered starting from zero)

Paths to image sets are relative to the "data" directory. The format of the file name must be as follows (all zero based):

 

�� 0SSSSIIII(a zero followed by a four-digit, zero-padded set number followed by a four-digit, zero-padded image number)

 

�� 000030010(eleventh image of the fourth set)

 

Any extension is specified with the -e flag above and any DevIL supported, 24 bit image should work.

 

Slides(numbered starting from one)

The slide images must be placed in the "data/slides" directory and named as follows:

�� immold_###

where ### is a zero-padded number starting at 001.Any extension is specified with the -e flag above and any DevIL supported, 24 bit image should work.

 

Images

Must be of the dimensions 1024 x 768 x 3 bytes.

 

General Controls:

ESC���������

quit

SPACE�������

start/stop rotation around y axis

NUMPAD LEFT

rotate point cloud left

NUMPAD RIGHT

rotate point cloud right

NUMPAD HOME

rotate object positively around y axis

NUMPAD PGUP

rotate object negatively around y axis

LEFT��������

translate object along negative x axis

RIGHT�������

translate object along positive x axis

UP����������

translate object along negative z axis

DOWN��������

translate object along positive z axis

HOME��������

reset rotation

END��������

reset object translations

B�����������

toggle AABB