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

Function read

deps/opencv/modules/core/src/persistence.cpp:5531–5554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5529
5530
5531void read( const FileNode& node, Mat& mat, const Mat& default_mat )
5532{
5533 if( node.empty() )
5534 {
5535 default_mat.copyTo(mat);
5536 return;
5537 }
5538 void* obj = cvRead((CvFileStorage*)node.fs, (CvFileNode*)*node);
5539 if(CV_IS_MAT_HDR_Z(obj))
5540 {
5541 Mat((const CvMat*)obj).copyTo(mat);
5542 cvReleaseMat((CvMat**)&obj);
5543 }
5544 else if(CV_IS_MATND_HDR(obj))
5545 {
5546 Mat((const CvMatND*)obj).copyTo(mat);
5547 cvReleaseMatND((CvMatND**)&obj);
5548 }
5549 else
5550 {
5551 cvRelease(&obj);
5552 CV_Error(CV_StsBadArg, "Unknown array type");
5553 }
5554}
5555
5556void read( const FileNode& node, SparseMat& mat, const SparseMat& default_mat )
5557{

Callers 1

readMethod · 0.70

Calls 8

cvReadFunction · 0.85
MatClass · 0.85
cvReleaseMatFunction · 0.85
cvReleaseMatNDFunction · 0.85
cvReleaseFunction · 0.85
SparseMatClass · 0.85
emptyMethod · 0.45
copyToMethod · 0.45

Tested by

no test coverage detected