Generated from LibVision.c with ROBODoc v3.2.2 on Tue Dec 05 11:08:26 2000
TABLE OF CONTENTS
- LibVision/VIS_RGB2Hue
- LibVision/VIS_RGB2Sat
- LibVision/VIS_RGB2Int
- LibVision/VIS_FillHueTable
- LibVision/VIS_FillRGBSpace
- LibVision/VIS_FillWhiteClass
- LibVision/VIS_ReduceNoise
- LibVision/VIS_ReduceNoisef
- LibVision/VIS_ReduceNoise2
- LibVision/VIS_ReduceNoise2f
- LibVision/VIS_FindLimits
- LibVision/VIS_FindClass
- LibVision/VIS_FindClasses
- LibVision/VIS_MedianHue
- LibVision/VIS_Init
- LibVision/VIS_ColClear
- LibVision/VIS_ColInit
- LibVision/VIS_ColFindOne
- LibVision/VIS_ColFind
- LibVision/VIS_CamCal
- LibVision/VIS_ModifyCam
- LibVision/VIS_ModifyAlgo
- LibVision/VIS_InitDistance
- LibVision/VIS_GetPosition
- LibVision/VIS_InitBwimg
- LibVision/VIS_ComputeBW
- LibVision/VIS_DrawLimits
- LibVision/VIS_DrawBorder
- LibVision/VIS_MarkObject
- LibVision/VIS_ErrorDisplay
- LibVision/VIS_InitShowProgress
- LibVision/VIS_ShowProgress
- LibVision/VIS_ShowOffset
- LibVision/VIS_InitCam
- LibVision/VIS_AutobrightnessDelay
- LibVision/VIS_TeamRobot
SYNOPSIS
BYTE VIS_RGB2Hue(BYTE R, BYTE G, BYTE B)
DESCRIPTION
Converts (R,G,B) triplet into Hue value between 0 and 252.
SEE ALSO
VIS_RGB2Sat VIS_RGB2Int
Thomas Braunl, UWA 1998.
SYNOPSIS
BYTE VIS_RGB2Sat(int R, int G, int B)
DESCRIPTION
Converts (R,G,B) triplet into Saturation value between 0 and 255.
SEE ALSO
VIS_RGB2Hue VIS_RGB2Int
SYNOPSIS
BYTE VIS_RGB2Int(int R, int G, int B)
DESCRIPTION
Converts (R,G,B) triplet into Intensity value between 0 and 255.
SEE ALSO
VIS_RGB2Hue VIS_RGB2Sat
SYNOPSIS
void VIS_FillHueTable(void)
DESCRIPTION
Fills the RGB to Hue conversion table for faster conversion. Sets the HueTableOK flag to 1.
The RGB->Hue conversion table is a global variable.
SEE ALSO
VIS_FillRGBSpace VIS_FillWhiteClass
SYNOPSIS
void VIS_FillRGBSpace(BYTE HueMin, BYTE HueMax, BYTE Saturation,
BYTE ColourClass, VIS_RGBSpace *RGBSpace)
DESCRIPTION
Fills the RGB space cube with a colour class, using a saturation threshold.
The saturation threshold can be the default defined one (VIS_SAT_THRES).
'ColourClass' is defined by the user and is the reference to the colour-class.
SEE ALSO
VIS_ColInit VIS_ColClear VIS_ColFind VIS_FillHueTable VIS_FillWhiteClass
SYNOPSIS
void VIS_FillWhiteClass(int SatMin, int SatMax, BYTE IntMin, BYTE IntMax,
BYTE ColourClass, VIS_RGBSpace *RGBSpace)
DESCRIPTION
Fills a white class in the RGB space.
'SatMin' and 'SatMax' define the saturation range, 'SatMax' may be VIS_SAT_THRES for instance.
The shade between black and white is defined by the intensity range (IntMin, IntMax).
'ColourClass' is defined by the user and is the reference to the colour-class.
SEE ALSO
VIS_ColInit VIS_ColClear VIS_ColFind VIS_FillHueTable
SYNOPSIS
int VIS_ReduceNoise(VIS_Process *Process, int len)
DESCRIPTION
Denoise every pixels with a depth of 'len'.
SEE ALSO
VIS_ReduceNoisef VIS_ReduceNoise2 VIS_ReduceNoise2f
SYNOPSIS
int VIS_ReduceNoisef(VIS_Process *Process)
DESCRIPTION
Denoise 'f' every pixels using the fast loop (i.e. one pixel around).
SEE ALSO
VIS_ReduceNoise VIS_ReduceNoise2 VIS_ReduceNoise2f
SYNOPSIS
int VIS_ReduceNoise2(VIS_Process *Process, int len)
DESCRIPTION
Denoise '2' i.e. every two pixels.
SEE ALSO
VIS_ReduceNoise VIS_ReduceNoisef VIS_ReduceNoise2f
SYNOPSIS
int VIS_ReduceNoise2f(VIS_Process *Process)
DESCRIPTION
Denoise '2f' i.e. every two pixels and fast (i.e. one pixel around).
SEE ALSO
VIS_ReduceNoise VIS_ReduceNoisef VIS_ReduceNoise2
SYNOPSIS
void VIS_FindLimits(int* pTop, int* pBot, int* pRight, int* pLeft, VIS_Object *Object)
DESCRIPTION
Find the limits of the segmented objects.
SEE ALSO
VIS_FindLimits VIS_FindClass VIS_FindClasses VIS_ColFindOne VIS_ColFind
SYNOPSIS
void VIS_FindClass(colimage *Pic, VIS_RGBSpace *RGBSpace, VIS_Object *Object, int ColourClass)
DESCRIPTION
Build a binary map for a specific colour class.
Input : a colimage, the RGBSpace to use, and the ColourClass to look for.
Output : a VIS_Object structure containing the object informations.
SEE ALSO
VIS_FindLimits VIS_ColFindOne VIS_ColFind VIS_FindClass VIS_FindClasses
SYNOPSIS
void VIS_FindClasses(BYTE number, colimage *Pic, VIS_RGBSpace *RGBSpace, VIS_Process *Process,
BYTE *ColourList)
DESCRIPTION
Build a binary map for several colour classes.
'Process' and 'ColourClass' are arrays having 'number' elements.
SEE ALSO
VIS_FindLimits VIS_ColFindOne VIS_ColFind VIS_FindClass
SYNOPSIS
VIS_DefineHue VIS_MedianHue(colimage *Pic, int size)
DESCRIPTION
Finds median hue and the hue range out of the middle part of the picture.
'size' can not be more than 10.
Returns a VIS_DefineHue structure containing the median Hue (VIS_DefineHue.Hue) and
the Hue range (VIS_DefineHue.Range).
Both structure elements are set to -1 if an error occured.
SEE ALSO
SYNOPSIS
void VIS_Init(void)
DESCRIPTION
Fills the hue conversion table and initialise the algorithm and camera offset defaults.
SEE ALSO
SYNOPSIS
void VIS_ColClear(VIS_RGBSpace *RGBSpace)
DESCRIPTION
Clears the RGB space: fills it with the VIS_NONE value.
SEE ALSO
VIS_ColInit VIS_ColFind
SYNOPSIS
void VIS_ColInit(VIS_HueTable *HueTable, VIS_RGBSpace *RGBSpace, int ColourClass)
DESCRIPTION
Initialise a new colour class.
SEE ALSO
VIS_ColClear VIS_ColFind
SYNOPSIS
void VIS_ColFindOne(colimage *Pic, VIS_RGBSpace *RGBSpace, VIS_Object *Object, BYTE ColourClass)
DESCRIPTION
Finds the specified colour class.
Returns the ColourClass found : either ColourClass, either VIS_NONE.
SEE ALSO
VIS_ColInit VIS_ColClear VIS_ColFind
SYNOPSIS
int VIS_ColFind(int number, colimage *Pic, VIS_RGBSpace *RGBSpace,
VIS_Object *Object, BYTE *ColourList)
DESCRIPTION
Finds several colour classes pur in a list.
Returns -1 if 'number' is bigger than the maximum number of classes, 0 for no errors.
SEE ALSO
VIS_ColInit VIS_ColClear VIS_ColFindOne
SYNOPSIS
void VIS_CamCal(VIS_RGBSpace *RGBSpace, BYTE ColourClass)
DESCRIPTION
Camera angle offset
SEE ALSO
SYNOPSIS
void VIS_ModifyCam(VIS_CamOffset *NewCam)
DESCRIPTION
Modify camera offset values.
Input : a new 'VIS_CamOffset' structure.
'VIS_CamOffset' is 5 values : angle and beta as floats
alpha as BYTE
height and lenght as int
Output : 0 for no errors, 1 is the NewCam is not valid.
SEE ALSO
VIS_ModifyAlgo
SYNOPSIS
void VIS_ModifyAlgo(VIS_Algo *NewAlgo)
DESCRIPTION
Modify algorithm values.
Input : a new 'VIS_algo' structure.
'VIS_Algo' is 4 integers : depth, fast, step and loop (modified automatically).
Program is checking error in 'VIS_Algo' values, display them and return an error code.
If an error occurs, no changes are made.
Output : an error code : ==0 -> no errors; >0 -> an error occured.
SEE ALSO
VIS_ModifyCam
SYNOPSIS
BYTE VIS_InitDistance(void)
DESCRIPTION
Check the CamInfo and initialise distances lookup tables.
Output : returns 0 if VIS_struct is set up properly, >0 if not or if beta angle not set up.
SEE ALSO
VIS_GetPosition()
SYNOPSIS
int VIS_GetPosition(VIS_Object *Object, VIS_Distance *ObjDist)
DESCRIPTION
Returns the distance of the ball by looking into the lookup tables.
A VIS_distance struct is made of 3 integers : d_row, d_col and dist.
Where dist is the direct distance between the robot and the ball,
(d_row,d_col) are the relative coordinates of the ball compared to the robot position,
So that dist^2=d_row^2+d_col^2.
d_row is the depth of the ball compared to the robot position,
d_col is the side distance of the ball compared to the robot.
Input : an object structure (VIS_Object) and a VIS_Distance result structure.
Output : 0 on success, -1 if distance table is not initialised.
SEE ALSO
VIS_Init_distance()
SYNOPSIS
void VIS_InitBwimg(BYTE *bwimg)
DESCRIPTION
BW LCD picture initialisation.
Input : 'Picture' structure.
Output : 0 no errors, -1 NULL bwimg pointer.
SEE ALSO
VIS_ComputeBW VIS_DrawLimits
SYNOPSIS
void VIS_ComputeBW(BYTE *bwimg, BYTE *temp)
DESCRIPTION
Get a 2D binary array and make a linear BW array for LCD display.
Input : a BW linear array for LCD display (bwimg), a 2D binary array (temp).
SEE ALSO
VIS_InitBwimg VIS_DrawLimits
SYNOPSIS
void VIS_DrawLimits(BYTE *bwimg, VIS_Object *Object, int value)
DESCRIPTION
Draw object limits and center on bw picture.
value==0 -> erase, value>0 -> draw.
Input : a BW linear array, the region to draw and a draw (i.e. >0) / erase (i.e. ==0) value.
Output : N/A
SEE ALSO
VIS_InitBwimg VIS_ComputeBW
SYNOPSIS
void VIS_DrawBorder(BYTE *bwimg, int rows, int cols)
DESCRIPTION
Draw borders in a 1D array for LCD display
Input : a 1D BW array, line and column of the border.
Output : N/A
SEE ALSO
SYNOPSIS
void VIS_MarkObject(image greyimg, int x_middle, int y_middle, int object_size)
DESCRIPTION
Mark object position by drawing a vertical and horizontal white
line through it. Ball size is displayed by black lines.
Birgit Graf, UWA 1998.
SYNOPSIS
void VIS_ErrorDisplay(char title[16], int error, char msg[16])
DESCRIPTION
Display error messages.
Input : a box title (16 char max.), an error code an error message (16 char max.).
Output : N/A
SEE ALSO
SYNOPSIS
void VIS_InitShowProgress(char title[16])
DESCRIPTION
Initialise the progress show of a loop (clear screen, display title,...).
Input : a loop title (16 char max.).
Output : N/A
SEE ALSO
SYNOPSIS
void VIS_ShowProgress(int actual, int max)
DESCRIPTION
Displays the progress of a loop.
Input : the number of the actual loop and the total number of loops.
Output : N/A
SEE ALSO
SYNOPSIS
void VIS_ShowOffset()
DESCRIPTION
Displays the actual offset of the camera.
'alpha' as a BYTE between 0 and 255, 'beta' as a float in degres.
SEE ALSO
SYNOPSIS
int VIS_InitCam(int mode)
DESCRIPTION
Initialisation of the camera. 10 retries.
Input : mode of the camera.
Output : camversion or INITERROR.
SEE ALSO
N/A
SYNOPSIS
void VIS_AutobrightnessDelay(int number)
DESCRIPTION
Let time to camera for autobrightness.
Input : number of waits.
Output : N/A
SEE ALSO
N/A
SYNOPSIS
int VIS_TeamRobot(void)
DESCRIPTION
Returns a robot team and ID.
Team is 0 for Eyecam and 1 for Quickam, ID is between 1 and 5.
Asks for robot ID if not between 1 and 5.
Input : N/A
Output : a two digits integer xy where x is the team and y is the ID.
SEE ALSO
N/A