error: (-5) in the case of classification problem the responses must be cate
2018-03-09 09:23
656 查看
气晕我~~~~~~~~~~~~~~~~~~~~~~~~~~~
OpenCV3.0以后的hog+svm中,调用函数svm->train(data_mat, ROW_SAMPLE, res_mat);对样本进行训练时需要注意data_mat和res_mat的类型。
其中:data_mat必须是Mat类型,其数据类型为32位的浮点数CV_32FC1,其宽度为样本的个数,高度为HOG特征的维数;
res_mat必须是Mat类型,其数据类型为32位整数CV_32SC1,其宽度位样本的个数,高度为1。
OpenCV3.0以后的hog+svm中,调用函数svm->train(data_mat, ROW_SAMPLE, res_mat);对样本进行训练时需要注意data_mat和res_mat的类型。
其中:data_mat必须是Mat类型,其数据类型为32位的浮点数CV_32FC1,其宽度为样本的个数,高度为HOG特征的维数;
res_mat必须是Mat类型,其数据类型为32位整数CV_32SC1,其宽度位样本的个数,高度为1。
for (vector<float>::iterator iter = descriptors.begin(); iter != descriptors.end(); iter++) { data_mat.at<float>(i, j) = descriptors[j]; } res_mat.at<int>(i, 0) = img_catg[i];
相关文章推荐
- TypeError: view must be a callable or a list/tuple in the case of include()
- TypeError: view must be a callable or a list/tuple in the case of include().
- TypeError: view must be a callable or a list/tuple in the case of include().解决办法
- TypeError: view must be a callable or a list/tuple in the case of include()
- TypeError: view must be a callable or a list/tuple in the case of include()
- Django URLs error: view must be a callable or a list/tuple in the case of include()
- django 单元测试报错: view must be a callable or a list/tuple in the case of include().
- Django URLs error: view must be a callable or a list/tuple in the case of include()
- error -5008: intel64 or amd64 must be specified in the template of the summary
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- python django1.10解决view must be a callable list/tuple in case of include()
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- Word2010 Error:The name in the end tag of the element must match the element type in the start tag.
- The type OneInterface cannot be a superinterface of OneInterfaceImpl; a superinterface must be an in
- error : A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be ext
- Question 41: Which of the following operators must be overloaded by function objects in the Standard Template Library?
- 导入adt项目进入android studio报Error:(2) Error parsing XML: prefix must not be bound to one of the reserved
- Fix the problem: java.lang.OutOfMemoryError: PermGen space in Java development
- Main application must be in the list of application paths
- An error message detailing the cause of this specific request failure can be found in the application event log of the