vgbox(1)

PROGRAM
vgbox - This program create a grey level file image.
 It makes a file filled with a represention of a plain parallelogram projected on the CCD sensor.
  14 optionnal parameters can be defined.

SYNTAX

vgbox

-o  resulting output image

[-trigger]
    trigger input

[-r]
    Number of Rows (Height in pixels) of the CCD sensor

[-c]
    Number of Columns (Width in pixels) of the CCD sensor

[-px_h]
    Active Pixel Height (vertical)

[-px_w]
    Active Pixel Width (horizontal)

[-px_y_off]
    Active Pixel offset from the top of the cell

[-px_x_off]
    Active Pixel offset from the left of the cell

[-h]
    Height of the parallelogram (box) (in pixel unit)

[-w]
    Width of the parallelogram (box) (in pixel unit)

[-im_y_off]
    Downward offset of the box (0 is CCD center = box center)

[-im_x_off]
    Right offset of the box (0 is CCD center = box center)

[-angle]
    Box rotation (clockwise, degrees) (center = box center)

[-corner_angl]
    the value of the 1st corner angle (degrees)

[-g_o]
    Grey level of the background pixels outside of the box

[-g_i]
    Grey level of the lighted pixels inside the box

[-V]
    Gives the version for vgbox

[-U]
    Gives the usage for vgbox

[-P]
    Prompts for command line options

[-A [file1]]
    Creates the answer file called vgbox.ans or file1

[-a [file1]]
    Uses vgbox.ans or file1 as the answer file

DESCRIPTION
This program create a grey level image file filled with a represention of a parallelogram (box) projected on the CCD sensor.
 It calculates the grey level of each pixel from the intersection of the theorical parallelogram and the rectangular active area of each sensor-pixel.
 The sensor is made of pixels suposed to be all identical, composed of an active rectangular area in a rectangular cell.
  14 optionnal 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 degres).
       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 euclidian distances between the parallel lines. UPDATE: August 1991 : new optionnal 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

-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.000000 < [-px_h] < 1.000000

-px_w
    type: float
    desc: Active Pixel Width (horizontal)
    default: 1
    bounds: 0.000000 < [-px_w] < 1.000000

-px_y_off
    type: float
    desc: Active Pixel offset from the top of the cell
    default: 0
    bounds: 0.000000 < [-px_y_off] < 1.000000

-px_x_off
    type: float
    desc: Active Pixel offset from the left of the cell
    default: 0
    bounds: 0.000000 < [-px_x_off] < 1.000000

-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 the box (0 is CCD center = box center)
    default: 0
    bounds: no range checking

-im_x_off
    type: float
    desc: Right offset of the 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: 0.000001 < [-corner_angl] < 179.998993

-g_o
    type: integer
    desc: Grey level of the background pixels outside of the box
    default: 10
    bounds: 0 < [-g_o] < 255

-g_i
    type: integer
    desc: Grey level of the lighted pixels inside the 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 degres clockwise..

vgbox -o image.xv -corner_angl 60

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

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lvgbox(3) lvgbox(3)

RESTRICTIONS
Pixel width + pixel offset must be egal 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 heigth sizes of the box are the euclidian distances between the parallel lines.

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.