Main Page   Modules   Compound List   File List   Compound Members   File Members  

line_feature.h File Reference

#include <gandalf/common/misc_defs.h>
#include <gandalf/vision/camera.h>
#include <gandalf/vision/local_feature.h>
#include <gandalf/image/pixel.h>
#include <gandalf/linalg/2vectorf.h>
#include <gandalf/linalg/2x3matrixf.h>

Go to the source code of this file.

Compounds

struct  Gan_LineFeature
 2D line feature structure. More...

struct  Gan_LineFeatureMap
 2D line feature map structure. More...


Typedefs

typedef Gan_LineFeature Gan_LineFeature
 2D line feature structure.

typedef Gan_LineFeatureMap Gan_LineFeatureMap
 2D line feature map structure.


Functions

Gan_LineFeatureMapgan_line_feature_map_form (Gan_LineFeatureMap *lmap, unsigned max_nlines)
 Forms a line feature map structure.

void gan_line_feature_map_free (Gan_LineFeatureMap *lmap)
 Frees a line feature map structure.

Gan_Bool gan_line_feature_map_clear (Gan_LineFeatureMap *lmap, unsigned height, unsigned width, Gan_Matrix23_f *A, Gan_LocalFeatureMapParams *lpms)
 Sets up and clears a line feature map structure.

Gan_LineFeaturegan_line_feature_add (Gan_LineFeatureMap *lmap, float y1, float x1, float y2, float x2, Gan_SquMatrix22_f *N, int status, int index, float strength, Gan_Vector2_f *point, unsigned npoints)
 Adds a line to a line feature map.

Gan_Bool gan_line_feature_map_postprocess (Gan_LineFeatureMap *lmap)
 Postprocess feature map.

Gan_LineFeatureMapgan_line_feature_map_alloc (unsigned max_nlines)
 Macro: Allocates a line feature map structure.


Detailed Description

Module: Image line segment definition and functions

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited


Function Documentation

Gan_LineFeature* gan_line_feature_add Gan_LineFeatureMap   lmap,
float    y1,
float    x1,
float    y2,
float    x2,
Gan_SquMatrix22_f   N,
int    status,
int    index,
float    strength,
Gan_Vector2_f   point,
unsigned    npoints
 

Adds a line to a line feature map.

Parameters:
lmap A line feature map
y1 The row location of the first line endpoint
x1 The column location of the first line endpoint
y2 The row location of the second line endpoint
x2 The column location of the second line endpoint
N Covariance of canonical line parameters
status The status of the line feature (user-defined)
index The index of the line feature (user-defined)
strength The strength of the line feature
point Array of points or NULL
npoints Number of points in array or zero (if point is NULL)
Adds a line to a line feature map with given coordinates, both in integer and floating line formats, which should both be in the coordinate frame of the feature window, with (0,0) at the top-left corner. This routine transforms the floating line coordinates appropriately given the affine transformation defined by the feature map structure lmap, removes any non-linear distortion specified by the camera part of the feature map structure, and writes all the information into a new feature line structure, a lineer to which is returned.

The strength should be in units linear with the image intensity, if that is applicable.

N is the covariance of the canonical line parameters a/b in y=ax+b, with the x/y coordinate system centred on the midpoint of the line (p1+p2)/2, with the positive x-axis along the line towards the p2 endpoint, and the positive y-axis 90 degrees anticlockwise from the x-axis.

Returns:
Non-NULL pointer to the new feature structure, or NULL on failure.

Gan_Bool gan_line_feature_map_clear Gan_LineFeatureMap   lmap,
unsigned    height,
unsigned    width,
Gan_Matrix23_f   A,
Gan_LocalFeatureMapParams   lpms
 

Sets up and clears a line feature map structure.

Parameters:
lmap A line feature map
height The height of the feature map region
width The width of the feature map region
A Affine transformation from window to line coords or NULL
lpms Local feature map parameters or NULL
Sets attributes of a line feature map prior to filling the feature map with lines. The lpms argument, if not NULL, is passed to gan_local_feature_map_form() to build a local blocked feature map for the line features.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.

Gan_LineFeatureMap* gan_line_feature_map_form Gan_LineFeatureMap   lmap,
unsigned    max_nlines
 

Forms a line feature map structure.

Parameters:
lmap A line feature map
max_nlines The number of lines initially to allocate for
Fills a structure to hold line features, and sets it to be empty.

Returns:
non-NULL The formed feature map lmap, or NULL on failure.
See also:
gan_line_feature_map_alloc(), gan_line_feature_map_free().

void gan_line_feature_map_free Gan_LineFeatureMap   lmap
 

Frees a line feature map structure.

Parameters:
lmap A line feature map
Frees a previously formed/allocated structure that holds line features.

Returns:
No value.
See also:
gan_line_feature_map_form(), gan_line_feature_map_alloc().

Gan_Bool gan_line_feature_map_postprocess Gan_LineFeatureMap   lmap
 

Postprocess feature map.

Parameters:
lmap A line feature map
Postprocess feature map, building index array into local feature map. Call this function after building local feature counts with gan_line_feature_add() using a UINT_MAX index argument, so that the index array for the local features will be built.

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


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