1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +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
+12 -12
View File
@@ -327,7 +327,7 @@ public:
void clear();
protected:
int read_params( CvFileStorage* fs );
int read_params( const cv::FileStorage& fs );
void run_func(void);
void set_error_context( const char* condition,
const char* err_msg,
@@ -385,26 +385,26 @@ void Core_DynStructBaseTest::clear()
}
int Core_DynStructBaseTest::read_params( CvFileStorage* fs )
int Core_DynStructBaseTest::read_params( const cv::FileStorage& fs )
{
int code = cvtest::BaseTest::read_params( fs );
double sqrt_scale = sqrt(ts->get_test_case_count_scale());
if( code < 0 )
return code;
struct_count = cvReadInt( find_param( fs, "struct_count" ), struct_count );
max_struct_size = cvReadInt( find_param( fs, "max_struct_size" ), max_struct_size );
generations = cvReadInt( find_param( fs, "generations" ), generations );
iterations = cvReadInt( find_param( fs, "iterations" ), iterations );
read( find_param( fs, "struct_count" ), struct_count, struct_count );
read( find_param( fs, "max_struct_size" ), max_struct_size, max_struct_size );
read( find_param( fs, "generations" ), generations, generations );
read( find_param( fs, "iterations" ), iterations, iterations );
generations = cvRound(generations*sqrt_scale);
iterations = cvRound(iterations*sqrt_scale);
min_log_storage_block_size = cvReadInt( find_param( fs, "min_log_storage_block_size" ),
min_log_storage_block_size );
max_log_storage_block_size = cvReadInt( find_param( fs, "max_log_storage_block_size" ),
max_log_storage_block_size );
min_log_elem_size = cvReadInt( find_param( fs, "min_log_elem_size" ), min_log_elem_size );
max_log_elem_size = cvReadInt( find_param( fs, "max_log_elem_size" ), max_log_elem_size );
read( find_param( fs, "min_log_storage_block_size" ),
min_log_storage_block_size, min_log_storage_block_size );
read( find_param( fs, "max_log_storage_block_size" ),
max_log_storage_block_size, max_log_storage_block_size );
read( find_param( fs, "min_log_elem_size" ), min_log_elem_size, min_log_elem_size );
read( find_param( fs, "max_log_elem_size" ), max_log_elem_size, max_log_elem_size );
struct_count = cvtest::clipInt( struct_count, 1, 100 );
max_struct_size = cvtest::clipInt( max_struct_size, 1, 1<<20 );