fixed CvBoost
This commit is contained in:
parent
a16d304d52
commit
073a8a6f27
@ -899,6 +899,7 @@ CvBoost::CvBoost()
|
|||||||
data = 0;
|
data = 0;
|
||||||
weak = 0;
|
weak = 0;
|
||||||
default_model_name = "my_boost_tree";
|
default_model_name = "my_boost_tree";
|
||||||
|
|
||||||
active_vars = active_vars_abs = orig_response = sum_response = weak_eval =
|
active_vars = active_vars_abs = orig_response = sum_response = weak_eval =
|
||||||
subsample_mask = weights = subtree_weights = 0;
|
subsample_mask = weights = subtree_weights = 0;
|
||||||
have_active_cat_vars = have_subsample = false;
|
have_active_cat_vars = have_subsample = false;
|
||||||
@ -967,7 +968,9 @@ CvBoost::CvBoost( const CvMat* _train_data, int _tflag,
|
|||||||
weak = 0;
|
weak = 0;
|
||||||
data = 0;
|
data = 0;
|
||||||
default_model_name = "my_boost_tree";
|
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,
|
train( _train_data, _tflag, _responses, _var_idx, _sample_idx,
|
||||||
_var_type, _missing_mask, _params );
|
_var_type, _missing_mask, _params );
|
||||||
@ -2115,7 +2118,8 @@ CvBoost::CvBoost( const Mat& _train_data, int _tflag,
|
|||||||
weak = 0;
|
weak = 0;
|
||||||
data = 0;
|
data = 0;
|
||||||
default_model_name = "my_boost_tree";
|
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,
|
train( _train_data, _tflag, _responses, _var_idx, _sample_idx,
|
||||||
_var_type, _missing_mask, _params );
|
_var_type, _missing_mask, _params );
|
||||||
|
@ -307,7 +307,7 @@ protected:
|
|||||||
CV_Assert( DataType<ValueType>::type == validDescriptors.type() );
|
CV_Assert( DataType<ValueType>::type == validDescriptors.type() );
|
||||||
|
|
||||||
int dimension = validDescriptors.cols;
|
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++ )
|
for( int y = 0; y < validDescriptors.rows; y++ )
|
||||||
{
|
{
|
||||||
DistanceType dist = distance( validDescriptors.ptr<ValueType>(y), calcDescriptors.ptr<ValueType>(y), dimension );
|
DistanceType dist = distance( validDescriptors.ptr<ValueType>(y), calcDescriptors.ptr<ValueType>(y), dimension );
|
||||||
|
@ -237,7 +237,7 @@ void computeDepthDiscontMask( const Mat& disp, Mat& depthDiscontMask, const Mat&
|
|||||||
|
|
||||||
Mat curDisp; disp.copyTo( curDisp );
|
Mat curDisp; disp.copyTo( curDisp );
|
||||||
if( !unknDispMask.empty() )
|
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)) );
|
Mat maxNeighbDisp; dilate( curDisp, maxNeighbDisp, Mat(3, 3, CV_8UC1, Scalar(1)) );
|
||||||
if( !unknDispMask.empty() )
|
if( !unknDispMask.empty() )
|
||||||
curDisp.setTo( Scalar(numeric_limits<float>::max()), unknDispMask );
|
curDisp.setTo( Scalar(numeric_limits<float>::max()), unknDispMask );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user