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

Function cvSliceLength

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

Source from the content-addressed store, hash-verified

509
510
511CV_IMPL int
512cvSliceLength( CvSlice slice, const CvSeq* seq )
513{
514 int total = seq->total;
515 int length = slice.end_index - slice.start_index;
516
517 if( length != 0 )
518 {
519 if( slice.start_index < 0 )
520 slice.start_index += total;
521 if( slice.end_index <= 0 )
522 slice.end_index += total;
523
524 length = slice.end_index - slice.start_index;
525 }
526
527 while( length < 0 )
528 length += total;
529 if( length > total )
530 length = total;
531
532 return length;
533}
534
535
536/* Copy all sequence elements into single continuous array: */

Callers 6

cvCvtSeqToArrayFunction · 0.85
cvSeqSliceFunction · 0.85
cvSeqRemoveSliceFunction · 0.85
cvArcLengthFunction · 0.85
icvContourSecAreaFunction · 0.85
cvContourAreaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected