mirror of https://github.com/CGAL/cgal
Fix warnings std::size_t -> int
This commit is contained in:
parent
717ab4ba5c
commit
5d67f15d4b
|
|
@ -127,15 +127,15 @@ public:
|
|||
if (ground_truth[i] != -1)
|
||||
++ nb_samples;
|
||||
|
||||
cv::Mat training_features (nb_samples, m_features.size(), CV_32FC1);
|
||||
cv::Mat training_labels (nb_samples, 1, CV_32FC1);
|
||||
cv::Mat training_features (int(nb_samples), int(m_features.size()), CV_32FC1);
|
||||
cv::Mat training_labels (int(nb_samples), 1, CV_32FC1);
|
||||
|
||||
for (std::size_t i = 0, index = 0; i < ground_truth.size(); ++ i)
|
||||
if (ground_truth[i] != -1)
|
||||
{
|
||||
for (std::size_t f = 0; f < m_features.size(); ++ f)
|
||||
training_features.at<float>(index, f) = m_features[f]->value(i);
|
||||
training_labels.at<float>(index, 0) = ground_truth[i];
|
||||
training_features.at<float>(int(index), int(f)) = m_features[f]->value(i);
|
||||
training_labels.at<float>(int(index), 0) = ground_truth[i];
|
||||
++ index;
|
||||
}
|
||||
|
||||
|
|
@ -194,9 +194,9 @@ public:
|
|||
{
|
||||
out.resize (m_labels.size(), 0.);
|
||||
|
||||
cv::Mat feature (1, m_features.size(), CV_32FC1);
|
||||
cv::Mat feature (1, int(m_features.size()), CV_32FC1);
|
||||
for (std::size_t f = 0; f < m_features.size(); ++ f)
|
||||
feature.at<float>(0, f) = m_features[f]->value(item_index);
|
||||
feature.at<float>(0, int(f)) = m_features[f]->value(item_index);
|
||||
|
||||
//compute the result of each tree
|
||||
#if (CV_MAJOR_VERSION < 3)
|
||||
|
|
|
|||
Loading…
Reference in New Issue