|
latest version v1.9 - last update 24 Nov 2005 |
|
#include <ltiContour.h>
Inheritance diagram for lti::borderPoints:


Public Member Functions | |
| borderPoints () | |
| borderPoints (const borderPoints &other) | |
| virtual | ~borderPoints () |
| const char * | getTypeName () const |
| borderPoints & | castFrom (const areaPoints &theAreaPoints) |
| borderPoints & | castFrom (const ioPoints &theIOPoints) |
| borderPoints & | castFrom (const polygonPoints &thePolygonPoints) |
| borderPoints & | castFrom (const polygonPoints &thePolygonPoints, const int &segments) |
| borderPoints & | operator= (const borderPoints &other) |
| bool | getFromMask (const channel8 &mask) |
| bool | generateMask (channel8 &mask, const bool computeBoundary=true, const bool exactBoundaryDimensions=false, const bool keepMaskData=false) const |
| void | invert () |
| bool | isConsistent () const |
For the explanation of the contour description in this class, see following image:
-- 00000000001111111111222222222233 -- 01234567890123456789012345678901 00 -------------------------------- 01 -------------------------------- 02 -------------------------------- 03 --------BBBB------BBBB---------- 04 -------B****BBB----B**B--------- 05 -------B*******B---B***B-------- 06 ------B*******B-----B*B--------- 07 -------B*******BBBBB**B--------- 08 ---------B*************B-------- 09 --------B**----*********B------- 10 --------B**-----********B------- 11 -------B**-----*******BB-------- 12 ------B**-----*******B---------- 13 ------B**-------******BB-------- 14 -----B**---------*******B------- 15 -----B**--------*********B------ 16 ----B**-------**********BB------ 17 ---B***----*******----BB-------- 18 ----BBBBBBBBB*** --*B---------- 19 -------------BBBBBBBB----------- 20 -------------------------------- 21 -------------------------------- 22 -------------------------------- 23 -------------------------------- "-" means background and the rest is part of the object. "B" indicates a borderpoint.
This contour class allows three representations of a contour:
|
|
default constructor creates an empty border-point-list
|
|
|
create this pointList as a copy of another pointList
|
|
|
destructor
|
|
||||||||||||
|
creates this borderPoint-List from the given PolygonPoint-List interpolating the curve with a cubicspline.
|
|
|
creates this borderPoint-List from the given PolygonPoint-List conecting the points with lines
|
|
|
creates this io-list from the given io-point-list
|
|
|
creates this border-point-list from the given area-point-list
|
|
||||||||||||||||||||
|
generate mask from border-points. The dimensions of the resulting mask are the smallest rectangle to contain the point (0,0) (optional) and all points in this list, plus 1 pixel in both width and heigth. If the boundary of the point list is not up to date, it can be calculated if specified in the parameters:
|
|
|
generate a border-point-list from the given mask image. This function assumes that the mask contains JUST ONE connected object. To get the biggest object on the mask see the lti::objectsFromMask functor. |
|
|
returns the name of this class: "borderPoints"
Reimplemented from lti::tpointList< T >. |
|
|
invert the direction of the border points
|
|
|
Check consistency of border points. Border points are consistent if the D8 distance between any two subsequent points (with the first point being subsequent to the last) is exactly 1, i.e. if every border point is "next to" its predecessor, with "next to" meaning "one of the 8 neighbouring pixels in the grid". |
|
|
assigment operator (alias for copy(other)).
|