mirror of https://github.com/CGAL/cgal
add missing std::ios::binary to input file stream
and fix conversion warnings
This commit is contained in:
parent
87c9ffd0fa
commit
5e4f3e72c6
|
|
@ -40,7 +40,7 @@ typedef Classification::Point_set_feature_generator<Kernel, Point_set, Pmap>
|
|||
int main (int argc, char** argv)
|
||||
{
|
||||
std::string filename (argc > 1 ? argv[1] : "data/b9_training.ply");
|
||||
std::ifstream in (filename.c_str());
|
||||
std::ifstream in (filename.c_str(), std::ios::binary);
|
||||
Point_set pts;
|
||||
|
||||
std::cerr << "Reading input" << std::endl;
|
||||
|
|
@ -91,7 +91,7 @@ int main (int argc, char** argv)
|
|||
Classification::classify_with_graphcut<CGAL::Sequential_tag>
|
||||
(pts, pts.point_map(), labels, classifier,
|
||||
generator.neighborhood().k_neighbor_query(12),
|
||||
0.2, 1, label_indices);
|
||||
0.2f, 1, label_indices);
|
||||
t.stop();
|
||||
std::cerr << "Classification with graphcut done in " << t.time() << " second(s)" << std::endl;
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ public:
|
|||
{
|
||||
for (std::size_t f = 0; f < m_features.size(); ++ f)
|
||||
training_features.at<float>(int(index), int(f)) = m_features[f]->value(i);
|
||||
training_labels.at<float>(int(index), 0) = ground_truth[i];
|
||||
training_labels.at<float>(int(index), 0) = static_cast<float>(ground_truth[i]);
|
||||
++ index;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue