Main Page   Modules   Compound List   File List   Compound Members   File Members  

local_feature.h File Reference

#include <gandalf/common/misc_defs.h>
#include <gandalf/image/image_defs.h>
#include <gandalf/linalg/2x3matrix.h>

Go to the source code of this file.

Compounds

struct  Gan_LocalFeatureMap
 Structure to hold blocked local feature information. More...

struct  Gan_LocalFeatureMapParams
 Structure to hold parameters for blocked local features. More...


Typedefs

typedef Gan_LocalFeatureMap Gan_LocalFeatureMap
 Structure to hold blocked local feature information.

typedef Gan_LocalFeatureMapParams Gan_LocalFeatureMapParams
 Structure to hold parameters for blocked local features.


Functions

Gan_LocalFeatureMapgan_local_feature_map_form (Gan_LocalFeatureMap *pmap, unsigned height, unsigned width, Gan_LocalFeatureMapParams *pms)
 Forms a local feature map structure.

void gan_local_feature_map_free (Gan_LocalFeatureMap *pmap)
 Frees a local feature map structure.

Gan_Bool gan_local_feature_map_clear (Gan_LocalFeatureMap *pmap, unsigned height, unsigned width, Gan_LocalFeatureMapParams *pms)
 Clears a local feature map structure.

Gan_Bool gan_local_feature_point_add (Gan_LocalFeatureMap *pmap, unsigned r, unsigned c, unsigned index)
 Adds a point feature to a local feature map.

Gan_Bool gan_local_feature_line_add (Gan_LocalFeatureMap *pmap, unsigned r1, unsigned c1, unsigned r2, unsigned c2, unsigned index)
 Adds a line feature to a local feature map.

Gan_Bool gan_local_feature_map_set_indices (Gan_LocalFeatureMap *pmap)
 Sets indices for a local feature map.

Gan_Bool gan_local_feature_map_find_block (Gan_LocalFeatureMap *pmap, double y, double x, Gan_Matrix23 *Ai, unsigned *cr, unsigned *cc)
 Computes the block a feature position lies in.

Gan_LocalFeatureMapgan_local_feature_map_alloc (unsigned height, unsigned width, Gan_LocalFeatureMapParams *pms)
 Macro: Allocates a local feature map structure.


Detailed Description

Module: Local blocked feature map definition & functions

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited


Function Documentation

Gan_Bool gan_local_feature_line_add Gan_LocalFeatureMap   pmap,
unsigned    r1,
unsigned    c1,
unsigned    r2,
unsigned    c2,
unsigned    index
 

Adds a line feature to a local feature map.

Parameters:
pmap The local feature map
r1 Row position of first endpoint of the feature
c1 Column position of first endpoing of the feature
r2 Row position of second endpoint of the feature
c2 Column position of second endpoing of the feature
index Index of the feature in the feature map referenced
Adds a line feature at endpoint positions (r1,c1) and (r2,c2) to the given local feature map. If index is UINT_MAX, the index is ignored; otherwise it is added to the index array stored in the local feature map.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_local_feature_point_add().

Gan_Bool gan_local_feature_map_clear Gan_LocalFeatureMap   pmap,
unsigned    height,
unsigned    width,
Gan_LocalFeatureMapParams   pms
 

Clears a local feature map structure.

Parameters:
pmap The local feature map
height The vertical size of the local feature map
width The vertical size of the local feature map
pms Pointer to a structure holding other parameters or NULL
Clears all the stored indices from an existing local feature map, and resets the dimensions of the feature map according to the provided arguments.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_local_feature_map_form(), gan_local_feature_map_free().

Gan_Bool gan_local_feature_map_find_block Gan_LocalFeatureMap   pmap,
double    y,
double    x,
Gan_Matrix23   Ai,
unsigned *    cr,
unsigned *    cc
 

Computes the block a feature position lies in.

Parameters:
pmap The local feature map
y The vertical feature position
x The horizontal feature position
Ai The transformation from x,y coords. into local feature map
cr Pointer to the resulting local feature map row
cc Pointer to the resulting local feature map column
Given coordinates x,y for a feature, and a transformation Ai to get back to the coordinates of the local feature map, returns the block row/column in the cr & cc pointers.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.

Gan_LocalFeatureMap* gan_local_feature_map_form Gan_LocalFeatureMap   pmap,
unsigned    height,
unsigned    width,
Gan_LocalFeatureMapParams   pms
 

Forms a local feature map structure.

Parameters:
pmap The local feature map to form
height The vertical size of the local feature map
width The vertical size of the local feature map
pms Pointer to a structure holding other parameters or NULL
Forms a structure to hold a local blocked representation of indices of features stored in a separate feature map (e.g. a point/edge/line feature map), and sets it to be empty. The pms structure contains the vertical/horizontal offsets between blocks, and the "catchment area" or size of each block.

Returns:
non-NULL the formed local feature map, or NULL on failure.
See also:
gan_local_feature_map_form(), gan_local_feature_map_free().

void gan_local_feature_map_free Gan_LocalFeatureMap   pmap
 

Frees a local feature map structure.

Parameters:
pmap The local feature map to free
Frees a structure holding a local blocked representation of indices of features.

Returns:
No value
See also:
gan_local_feature_map_form(), gan_local_feature_map_alloc().

Gan_Bool gan_local_feature_map_set_indices Gan_LocalFeatureMap   pmap
 

Sets indices for a local feature map.

Parameters:
pmap The local feature map
Having called gan_local_feature_point_add() and/or gan_local_feature_line_add() to count the features in the local feature map, this function allocates and builds the array of indices for those features. It doesn't fill the array with values, however. This is done by calling gan_local_feature_point_add() and/or gan_local_feature_line_add() again for each point/line feature with the correct index argument.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_local_feature_point_add().

Gan_Bool gan_local_feature_point_add Gan_LocalFeatureMap   pmap,
unsigned    r,
unsigned    c,
unsigned    index
 

Adds a point feature to a local feature map.

Parameters:
pmap The local feature map
r Row position of the feature
c Column position of the feature
index Index of the feature in the feature map referenced
Adds a point feature at position (r,c) to the given local feature map. If index is UINT_MAX, the index is ignored; otherwise it is added to the index array stored in the local feature map.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_local_feature_line_add().


Generated on Mon Oct 13 16:14:44 2003 by doxygen1.3-rc1