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

Function cvTreeToNodeSeq

deps/opencv/modules/core/src/datastructs.cpp:3332–3359  ·  view source on GitHub ↗

Gather pointers to all the sequences, accessible from the , to the single sequence.

Source from the content-addressed store, hash-verified

3330
3331// Gather pointers to all the sequences, accessible from the <first>, to the single sequence.
3332CV_IMPL CvSeq*
3333cvTreeToNodeSeq( const void* first, int header_size, CvMemStorage* storage )
3334{
3335 CvSeq* allseq = 0;
3336 CvTreeNodeIterator iterator;
3337
3338 if( !storage )
3339 CV_Error( CV_StsNullPtr, "NULL storage pointer" );
3340
3341 allseq = cvCreateSeq( 0, header_size, sizeof(first), storage );
3342
3343 if( first )
3344 {
3345 cvInitTreeNodeIterator( &iterator, first, INT_MAX );
3346
3347 for(;;)
3348 {
3349 void* node = cvNextTreeNode( &iterator );
3350 if( !node )
3351 break;
3352 cvSeqPush( allseq, &node );
3353 }
3354 }
3355
3356
3357
3358 return allseq;
3359}
3360
3361
3362typedef struct CvTreeNode

Callers 1

findContoursMethod · 0.85

Calls 4

cvCreateSeqFunction · 0.85
cvInitTreeNodeIteratorFunction · 0.85
cvNextTreeNodeFunction · 0.85
cvSeqPushFunction · 0.85

Tested by

no test coverage detected