next up previous contents
Next: Line Geometry Up: Geometrical Primitives Previous: Scalar   Contents

Point Geometry

Point geometry in 2D and 3D is represented by the
point2 and point3 data structures respectively. These are of the form

typedef struct point2
{
    Ts_id ts_id;                /* Tina structure identifier */
    unsigned int type;
    unsigned int label;
    struct vec2 p;
    struct list *props;
} Point2;

typedef struct point3
{
    Ts_id ts_id;                /* Tina structure identifier */
    unsigned int type;
    unsigned int label;
    struct vec3 p;
    struct list *props;
} Point3;

They are designed to represent physical entities in two and three dimensions. For example in corner stereo processing pairs of matched corners give rise to a Point3 when projected into world coordinates.

Point2 *point2_alloc(unsigned int type)

Point3 *point3_alloc(unsigned int type)

Point2 *point2_make(Vec2 p, unsigned int type)

Point3 *point3_make(Vec3 p, int type)

Point2 *point2_copy(Point2 * point)

Point3 *point3_copy(Point3 * point)

int     point2_number(List * points)

int     point3_number(List * points)

void    point2_free(Point2 * point)

void    point3_free(Point3 * point)

void    point2_format(Point2 * point)

void    point3_format(Point3 * point)

Obvious functions for manipulating point geometry.

The functions point2_copy, point3_copy, point2_free & point3_free copy and free the property list see proplist description for details).

The functions point2_format and point3_format produces a standard formatted output of point geometry using the standard Tina format facility. Usually directed to the top level text display window.

Point2 *point2_proj(Point2 * point, Mat3 proj)

Point2 *point2_rectify(Point2 * point, Mat3 rect)

void    point3_transform(Point3 * point, Transform3 trans)

Bool    point3_coincident(Point3 * p1, Point3 * p2, double poserror)

Bool    point3_within_error(Point3 * p1, Point3 * p2)

Transformation functions for point geometry.

point2_proj performs a projective transformation of the geometry in

point according to the 3X3 projection matrix proj_mat and return a pointer to the transformed version.

point3_transform applies the rotation and translation trans directly to the point geometry structure.

point3_coincident checks if p1 and p2 are spatially coincident within t e allowed position error poserror. point3_within_error performs the same test but with an error deined by the Iso_error structure.


next up previous contents
Next: Line Geometry Up: Geometrical Primitives Previous: Scalar   Contents
root 2017-11-18