<< PtList Datatypes Video >>

scicv >> Datatypes > PtLists

PtLists

Collection of PtList type

Description

PtLists is the type used to store a collection of PtList objects.

Such objects are returned from shape analysis functions, such as findContours for example, which returns several lists of points, each of one for each detected contour.

PtList supports the extraction operator (n:step:m), returning a single or a list of PtList, depending on the size of the interval.

PtList supports also the size function, returning the size of the list.

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]);

disp(typeof(contours));

disp("Number of contours:");
disp(size(contours));

See also


Report an issue
<< PtList Datatypes Video >>