removed ddepth from matrix (after Vadim's commit, it generates problem with core...
authorAlexander Shishkov <no@email>
Tue, 31 May 2011 21:14:42 +0000 (21:14 +0000)
committerAlexander Shishkov <no@email>
Tue, 31 May 2011 21:14:42 +0000 (21:14 +0000)
returned the new floating-point number formatting

modules/core/src/matrix.cpp
modules/core/src/persistence.cpp

index 177ff1b..dc42f14 100644 (file)
@@ -1873,7 +1873,7 @@ void cv::reduce(const InputArray& _src, OutputArray _dst, int dim, int op, int d
         op = CV_REDUCE_SUM;
         if( sdepth < CV_32S && ddepth < CV_32S )
             temp.create(dst.rows, dst.cols, CV_32SC(cn));
-        ddepth = CV_32S;
+        //ddepth = CV_32S;
     }
 
     ReduceFunc func = 0;
index 6558b42..96b3dfe 100644 (file)
@@ -775,7 +775,7 @@ icvDoubleToString( char* buf, double value )
             sprintf( buf, "%d.", ivalue );
         else
         {
-            static const char* fmt = "%.16e";
+            static const char* fmt = "%.17g";
             char* ptr = buf;
             sprintf( buf, fmt, value );
             if( *ptr == '+' || *ptr == '-' )
@@ -814,7 +814,7 @@ icvFloatToString( char* buf, float value )
             sprintf( buf, "%d.", ivalue );
         else
         {
-            static const char* fmt = "%.8e";
+            static const char* fmt = "%.9g";
             char* ptr = buf;
             sprintf( buf, fmt, value );
             if( *ptr == '+' || *ptr == '-' )