TLIB documentation
 

tlLine Class Reference

Collaboration diagram for tlLine:

Collaboration graph
[legend]

List of all members.


Detailed Description

This class contains the representation of a line segment. It is used by the tlHough line extractor class.

Public Member Functions

 tlLine ()
 tlLine (tlLine *line)
 tlLine (float theta, float r)
 tlLine (int x1, int y1, int x2, int y2)
 tlLine (tlPoint *p1, tlPoint *p2)
virtual ~tlLine ()
int set (tlLine *line)
int set (float theta, float r)
int set (int x1, int y1, int x2, int y2)
int set (tlPoint *p1, tlPoint *p2)
int fit (tlChain *chain)
int clip (tlRect *rect)
int clip (int width, int height)
int copy (tlLine *line)
int copyTo (tlLine *line)

Constructor & Destructor Documentation

tlLine::tlLine (  ) 

Constructor.

Returns:
See error management for details.

tlLine::tlLine ( tlLine line  ) 

Constructor.

Parameters:
line pointer to another tlLine to copy parameters from.
Returns:
See error management for details.

tlLine::tlLine ( float  ang,
float  rad 
)

Constructor.

Parameters:
ang line angle in polar representation (in [rad]).
rad line radius in polar representation (in [pix]).
Returns:
See error management for details.

tlLine::tlLine ( int  x1,
int  y1,
int  x2,
int  y2 
)

Constructor.

Parameters:
x1 first segment extremity X coord in [pix].
y1 first segment extremity Y coord in [pix].
x2 second segment extremity X coord in [pix].
y2 second segment extremity Y coord in [pix].
Returns:
See error management for details.

tlLine::tlLine ( tlPoint pt1,
tlPoint pt2 
)

Constructor.

Parameters:
pt1 first segment extremity.
pt2 second segment extremity.
Returns:
See error management for details.

tlLine::~tlLine (  )  [virtual]

Destructor.

Returns:
See error management for details.


Member Function Documentation

int tlLine::set ( tlLine line  ) 

Copy parameters from an existing tlLine object.

Parameters:
line pointer to another tlLine to copy parameters from.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLine::set ( float  ang,
float  rad 
)

Define the line parameters in polar coordonate system.

Parameters:
ang line angle in polar representation (in [rad]).
rad line radius in polar representation (in [pix]).
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLine::set ( int  x1,
int  y1,
int  x2,
int  y2 
)

Define the line segment parameters from the location of its extremities.

Parameters:
x1 first segment extremity X coord in [pix].
y1 first segment extremity Y coord in [pix].
x2 second segment extremity X coord in [pix].
y2 second segment extremity Y coord in [pix].
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLine::set ( tlPoint pt1,
tlPoint pt2 
)

Define the line segment parameters from the location of its extremities.

Parameters:
pt1 first segment extremity.
pt2 second segment extremity.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLine::fit ( tlChain chain  ) 

Define the line as the best fit from a series of points.

Parameters:
chain list of tlPoints to match.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLine::clip ( tlRect rect  ) 

Clip a line of arbitrary length to a bounding rectangle.

Parameters:
rect bounding rectangle that define the line clipping area.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLine::clip ( int  width,
int  height 
)

Clip a line of arbitrary length to a given dimension.

Parameters:
width clipping width.
height clipping height.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLine::copy ( tlLine line  ) 

Copy parameters from an existing tlLine object.

Parameters:
line pointer to another tlLine to copy parameters from.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlLine::copyTo ( tlLine line  ) 

Copy parameters to an existing tlLine object.

Parameters:
line pointer to another tlLine to copy parameters to.
Returns:
0 on success, -1 otherwise.
See error management for details.


The documentation for this class was generated from the following files:

TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.