fixed CvBoost

This commit is contained in:
Maria Dimashova 2011-01-12 12:53:36 +00:00
parent a16d304d52
commit 073a8a6f27
3 changed files with 8 additions and 4 deletions

View File

@ -899,6 +899,7 @@ CvBoost::CvBoost()
data = 0;
weak = 0;
default_model_name = "my_boost_tree";
active_vars = active_vars_abs = orig_response = sum_response = weak_eval =
subsample_mask = weights = subtree_weights = 0;
have_active_cat_vars = have_subsample = false;
@ -967,7 +968,9 @@ CvBoost::CvBoost( const CvMat* _train_data, int _tflag,
weak = 0;
data = 0;
default_model_name = "my_boost_tree";
orig_response = sum_response = weak_eval = subsample_mask = weights = 0;
active_vars = active_vars_abs = orig_response = sum_response = weak_eval =
subsample_mask = weights = subtree_weights = 0;
train( _train_data, _tflag, _responses, _var_idx, _sample_idx,
_var_type, _missing_mask, _params );
@ -2115,7 +2118,8 @@ CvBoost::CvBoost( const Mat& _train_data, int _tflag,
weak = 0;
data = 0;
default_model_name = "my_boost_tree";
orig_response = sum_response = weak_eval = subsample_mask = weights = 0;
active_vars = active_vars_abs = orig_response = sum_response = weak_eval =
subsample_mask = weights = subtree_weights = 0;
train( _train_data, _tflag, _responses, _var_idx, _sample_idx,
_var_type, _missing_mask, _params );

View File

@ -307,7 +307,7 @@ protected:
CV_Assert( DataType<ValueType>::type == validDescriptors.type() );
int dimension = validDescriptors.cols;
DistanceType curMaxDist = std::numeric_limits<DistanceType>::min();
DistanceType curMaxDist = -std::numeric_limits<DistanceType>::max();
for( int y = 0; y < validDescriptors.rows; y++ )
{
DistanceType dist = distance( validDescriptors.ptr<ValueType>(y), calcDescriptors.ptr<ValueType>(y), dimension );

View File

@ -237,7 +237,7 @@ void computeDepthDiscontMask( const Mat& disp, Mat& depthDiscontMask, const Mat&
Mat curDisp; disp.copyTo( curDisp );
if( !unknDispMask.empty() )
curDisp.setTo( Scalar(numeric_limits<float>::min()), unknDispMask );
curDisp.setTo( Scalar(-numeric_limits<float>::max()), unknDispMask );
Mat maxNeighbDisp; dilate( curDisp, maxNeighbDisp, Mat(3, 3, CV_8UC1, Scalar(1)) );
if( !unknDispMask.empty() )
curDisp.setTo( Scalar(numeric_limits<float>::max()), unknDispMask );