RETRO commands


PROGRAM NAME

vgbox - Create Image of Parallelogram Projected onto CCD Sensor (K1)

DESCRIPTION

This program creates a grey level image file filled with a representation of a parallelogram (box) projected on the CCD sensor. It calculates the grey level of each pixel from the intersection of the theoretical parallelogram and the rectangular active area of each sensor-pixel. The sensor is made of pixels supposed to be all identical, composed of an active rectangular area in a rectangular cell.

14 optional parameters can be defined:

For the sensor: its number of columns (=rows_size) and number of rows (=cols_size), the size of each pixel active area, the position of active area on the whole pixel area.

For the parallelogram: X and Y sizes, its position (horizontal and vertical shifts), its rotation (in degrees). its shape (parallelogram). The grey levels of full lighted pixels and full dark pixels.

Speed: about 0.5 ms /pixel on a Sun 3. about 0.04 ms /pixel on a Sun 4 sparc station IPC.

Warning: The X and Y sizes of the parallelogram is the Euclidean distances between the parallel lines.

Update: August 1991 : new optional parameter for parallelogram

The trigger input can be used to cause vgbox to re-execute when used inside cantata. No image is read from this input.

REQUIRED ARGUMENTS

-o
type: outfile
desc: resulting output image

OPTIONAL ARGUMENTS

-trigger
type: infile
desc: trigger input
default: {none}
-r
type: integer
desc: Number of Rows (Height in pixels) of the CCD sensor
default: 512
bounds: value >= 0
-c
type: integer
desc: Number of Columns (Width in pixels) of the CCD sensor
default: 512
bounds: value >= 0
-px_h
type: float
desc: Active Pixel Height (vertical)
default: 1
bounds: 0 < [-px_h] < 1
-px_w
type: float
desc: Active Pixel Width (horizontal)
default: 1
bounds: 0 < [-px_w] < 1
-px_y_off
type: float
desc: Active Pixel offset from the top of the cell
default: 0
bounds: 0 < [-px_y_off] < 1
-px_x_off
type: float
desc: Active Pixel offset from the left of the cell
default: 0
bounds: 0 < [-px_x_off] < 1
-h
type: float
desc: Height of the parallelogram (box) (in pixel unit)
default: 40.3
bounds: value >= 0.0
-w
type: float
desc: Width of the parallelogram (box) (in pixel unit)
default: 20.6
bounds: value > 0.0
-im_y_off
type: float
desc: Downward offset of box (0 is CCD center = box center)
default: 0
bounds: no range checking
-im_x_off
type: float
desc: Right offset of box (0 is CCD center = box center)
default: 0
bounds: no range checking
-angle
type: float
desc: Box rotation (clockwise degrees, center = box center)
default: 15
bounds: no range checking
-corner_angl
type: float
desc: the value of the 1st corner angle (degrees)
default: 90
bounds: 1e-06 < [-corner_angl] < 179.999
-g_o
type: integer
desc: Grey level of the background pixels outside of box
default: 10
bounds: 0 < [-g_o] < 255
-g_i
type: integer
desc: Grey level of the lighted pixels inside of box
default: 200
bounds: 0 < [-g_i] < 255

EXAMPLES

vgbox -o image.xv

Will create an xv image "image.xv" with defaults parameters.

vgbox -o box1.xv -r 64 -c 64 -px_w 0.7 -px_h 0.8 -px_x_off 0.1 -px_y_off 0.15

Will create a square xv image "box1.xv" 64*64 pixels with the default box. Each CCD pixel have an active area of 70% * 80% and is shift 10% of a pixel width on the right and 15% downward of a pixel height from the top-left corner of its pixel cell.

vgbox -o box2.xv -r 64 -c 32 -w 10.5 -h 40.3 -im_x_off 20.4 -im_y_off -10.6 -angle 5.1

Will create an xv image "box2.xv" 64 rows by 32 columns with a rectangular box of 10.5 * 40.3 pixels. The box is 20.4 on the right and 10.6 upward, the rotation is 5.1 degrees clockwise..

vgbox -o image.xv -corner_angl 60

Will create an xv image "image.xv" not a rectangular box but a parallelogram.

SEE ALSO

lvgbox

RESTRICTIONS

Pixel width + pixel offset must be equal or less than 1.000.

The CCD cells are supposed square in order to obtain the asked angles.

For a parallelepipedic box, the width and height sizes of the box are the Euclidean distances between the parallel lines.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.