next up previous contents
Next: Edge Strings Up: Stereo matching Previous: Edge and Stereo Data   Contents

Edgerect

See figure 1

The Imrect data structure (details in programmers guide) with vtype set to ptr_v is used as the principal iconic representation for edge data.

typedef struct edgel
{
    Ts_id ts_id;                /* Tina structure identifier */
    unsigned int type; /* includes information as to rectification status */
    unsigned int label;
    struct vec2 pos;
    float orient; /* these could go to props list perhaps NAT */
    float contrast;
    struct list *props;
} Edgel;

The Vec2 pos is the sub pixel location of the edge with respect to the underlying image (or a transformed version of it). Where the center of the pixel indexed [i, j] is at sub pixel image location [i+0.5, j+0.5]. The fields orient and con represent the orientation of the edge and its absolute image contrast. The contrast of an edge is proportional to the absolute gradient across it. The orientation of an edge, given in radians is given by the local direction along the edge (- to with + clockwise). Orientations 0, and - are all horizontal, with 0 being light above dark and and - both being dark above light.

Individual edgels in the Imrect er can be indexed

er->array.ptr_v[i][j]

or using the shorthand macro

IM_PTR(er, i, j)

which will be NULL if no edgel is present at image location [i, j] (row i column j). The edge array is only defined for the region defined in the Imrect er.

The sparse edgel array can be searched more rapidly using the raster index rows that is accessed through the property list of the Imrect er by the proplist type ER_ROWS.

typedef struct rindex /* raster index to each row of an imrect */
{
    Ts_id ts_id;                /* Tina structure identifier */
    int type;                /* some form of feature pointers */
    struct imregion *region; /* region covered */
    void **index;            /* array of raster lists */
} Rindex;
where

rows->index[i]

is the list of edges on row i of the edgel array and is allocated using rx_alloc() .


next up previous contents
Next: Edge Strings Up: Stereo matching Previous: Edge and Stereo Data   Contents
root 2017-09-25