1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

completely new C++ persistence implementation (#13011)

* integrated the new C++ persistence; removed old persistence; most of OpenCV compiles fine! the tests have not been run yet

* fixed multiple bugs in the new C++ persistence

* fixed raw size of the parsed empty sequences

* [temporarily] excluded obsolete applications traincascade and createsamples from build

* fixed several compiler warnings and multiple test failures

* undo changes in cocoa window rendering (that was fixed in another PR)

* fixed more compile warnings and the remaining test failures (hopefully)

* trying to fix the last little warning
This commit is contained in:
Vadim Pisarevsky
2018-11-02 00:27:06 +03:00
committed by GitHub
parent ca55982669
commit 0f622206e4
51 changed files with 5662 additions and 8562 deletions
+34 -1
View File
@@ -3210,7 +3210,6 @@ void DefaultDeleter<IplImage>::operator ()(IplImage* obj) const { cvReleaseImage
void DefaultDeleter<CvMatND>::operator ()(CvMatND* obj) const { cvReleaseMatND(&obj); }
void DefaultDeleter<CvSparseMat>::operator ()(CvSparseMat* obj) const { cvReleaseSparseMat(&obj); }
void DefaultDeleter<CvMemStorage>::operator ()(CvMemStorage* obj) const { cvReleaseMemStorage(&obj); }
void DefaultDeleter<CvFileStorage>::operator ()(CvFileStorage* obj) const { cvReleaseFileStorage(&obj); }
template <typename T> static inline
void scalarToRawData_(const Scalar& s, T * const buf, const int cn, const int unroll_to)
@@ -3262,4 +3261,38 @@ void scalarToRawData(const Scalar& s, void* _buf, int type, int unroll_to)
} // cv::
/* universal functions */
CV_IMPL void
cvRelease( void** struct_ptr )
{
if( !struct_ptr )
CV_Error( CV_StsNullPtr, "NULL double pointer" );
if( *struct_ptr )
{
if( CV_IS_MAT(*struct_ptr) )
cvReleaseMat((CvMat**)struct_ptr);
else if( CV_IS_IMAGE(*struct_ptr))
cvReleaseImage((IplImage**)struct_ptr);
else
CV_Error( CV_StsError, "Unknown object type" );
}
}
void* cvClone( const void* struct_ptr )
{
void* ptr = 0;
if( !struct_ptr )
CV_Error( CV_StsNullPtr, "NULL structure pointer" );
if( CV_IS_MAT(struct_ptr) )
ptr = cvCloneMat((const CvMat*)struct_ptr);
else if( CV_IS_IMAGE(struct_ptr))
ptr = cvCloneImage((const IplImage*)struct_ptr);
else
CV_Error( CV_StsError, "Unknown object type" );
return ptr;
}
/* End of file. */