}
void MoveObj::to_mat(Mat &mat, int mcols, int mrows,
- VFrame *inp, int ix,int iy, BC_CModel mcolor_model)
+ VFrame *inp, int ix,int iy, int mcolor_model)
{
int mcomp = BC_CModels::components(mcolor_model);
int mbpp = BC_CModels::calculate_pixelsize(mcolor_model);
int psz = mbpp / mcomp;
- int mdepth = psz < 2 ? CV_8U : CV_16U;
+ int mdepth = psz < 2 ? CV_8U : psz < 4 ? CV_16U : CV_32F;
if( mat.dims != 2 || mat.depth() != mdepth || mat.channels() != mcomp ||
mat.cols != mcols || mat.rows != mrows ) {
mat.release();
to_mat(next_mat, w,h, iframe, 0,0, BC_GREY8);
int corner_count = MAX_COUNT;
- int search_radius = config.block_size;
+ int block_size = config.block_size;
int min_distance = config.search_radius;
goodFeaturesToTrack(next_mat,
*next_corners, corner_count, 0.01, // quality_level
- min_distance, noArray(), search_radius,
+ min_distance, noArray(), block_size,
0, // use_harris
0.04); // k