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

Method push_back

deps/opencv/modules/core/src/matrix.cpp:639–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639void Mat::push_back(const Mat& elems)
640{
641 int r = size.p[0], delta = elems.size.p[0];
642 if( delta == 0 )
643 return;
644 if( this == &elems )
645 {
646 Mat tmp = elems;
647 push_back(tmp);
648 return;
649 }
650 if( !data )
651 {
652 *this = elems.clone();
653 return;
654 }
655
656 size.p[0] = elems.size.p[0];
657 bool eq = size == elems.size;
658 size.p[0] = r;
659 if( !eq )
660 CV_Error(CV_StsUnmatchedSizes, "");
661 if( type() != elems.type() )
662 CV_Error(CV_StsUnmatchedFormats, "");
663
664 if( isSubmatrix() || dataend + step.p[0]*delta > datalimit )
665 reserve( std::max(r + delta, (r*3+1)/2) );
666
667 size.p[0] += delta;
668 dataend += step.p[0]*delta;
669
670 //updateContinuityFlag(*this);
671
672 if( isContinuous() && elems.isContinuous() )
673 memcpy(data + r*step.p[0], elems.data, elems.total()*elems.elemSize());
674 else
675 {
676 Mat part = rowRange(r, r + delta);
677 elems.copyTo(part);
678 }
679}
680
681
682Mat cvarrToMat(const CvArr* arr, bool copyData,

Callers 15

fromStrMethod · 0.45
split_stringFunction · 0.45
CommandLineParserMethod · 0.45
hasMethod · 0.45
getStringMethod · 0.45
ellipse2PolyFunction · 0.45
EllipseExFunction · 0.45
CollectPolyEdgesFunction · 0.45
FillEdgeCollectionFunction · 0.45
fillConvexPolyFunction · 0.45
fillPolyFunction · 0.45
polylinesFunction · 0.45

Calls 8

maxFunction · 0.70
typeFunction · 0.50
cloneMethod · 0.45
typeMethod · 0.45
isContinuousMethod · 0.45
totalMethod · 0.45
elemSizeMethod · 0.45
copyToMethod · 0.45

Tested by

no test coverage detected