<< Mat | Datatypes | PtLists >>

scicv >> Datatypes > PtList

# PtList

Type for a list of points

### Description

`PtList` is the type used to store a list of points.

This type is taken as input parameter of several functions, such as as `contourArea` for example.

`PtList` supports the extraction operator `(n:step:m)`, returning a matrix containing the point coordinates.

### Examples

    scicv_Init();

    img_gray = imread(getSampleImage("shapes.png"), CV_LOAD_IMAGE_GRAYSCALE);
    canny_img = Canny(img_gray, 100, 100*2, 3);

    [img_out, contours] = findContours(canny_img, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, [0, 0]);

    // First contour
    cnt = contours(1);
    disp(typeof(cnt));

    // Contour point coordinates
    disp(cnt(:));

### See also

- PtLists

Report an issue
<< Mat | Datatypes | PtLists >>