MCPcopy Create free account
hub / github.com/creatale/node-dv / cvEndFindContours

Function cvEndFindContours

deps/opencv/modules/imgproc/src/contours.cpp:1251–1276  ·  view source on GitHub ↗

The function add to tree the last retrieved/substituted contour, releases temp_storage, restores state of dst_storage (if needed), and returns pointer to root of the contour tree */

Source from the content-addressed store, hash-verified

1249 releases temp_storage, restores state of dst_storage (if needed), and
1250 returns pointer to root of the contour tree */
1251CV_IMPL CvSeq *
1252cvEndFindContours( CvContourScanner * _scanner )
1253{
1254 CvContourScanner scanner;
1255 CvSeq *first = 0;
1256
1257 if( !_scanner )
1258 CV_Error( CV_StsNullPtr, "" );
1259 scanner = *_scanner;
1260
1261 if( scanner )
1262 {
1263 icvEndProcessContour( scanner );
1264
1265 if( scanner->storage1 != scanner->storage2 )
1266 cvReleaseMemStorage( &(scanner->storage1) );
1267
1268 if( scanner->cinfo_storage )
1269 cvReleaseMemStorage( &(scanner->cinfo_storage) );
1270
1271 first = scanner->frame.v_next;
1272 cvFree( _scanner );
1273 }
1274
1275 return first;
1276}
1277
1278
1279#define ICV_SINGLE 0

Callers 2

cvFindContoursFunction · 0.85
imgproc_c.hFile · 0.85

Calls 2

icvEndProcessContourFunction · 0.85
cvReleaseMemStorageFunction · 0.85

Tested by

no test coverage detected