X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=error_rates.cc;h=4744ba9daeee9a6f55d2218529d667ac8986d75b;hb=bd7db9aaf937bdba66445231a39518f2ae30b0d3;hp=6d429e65d348b8ea14ffb3fa4b90457ab3f06518;hpb=a44d56305517dddd36027c2a84693f2785fd019a;p=folded-ctf.git
diff --git a/error_rates.cc b/error_rates.cc
index 6d429e6..4744ba9 100644
--- a/error_rates.cc
+++ b/error_rates.cc
@@ -1,22 +1,26 @@
-
-///////////////////////////////////////////////////////////////////////////
-// This program is free software: you can redistribute it and/or modify //
-// it under the terms of the version 3 of the GNU General Public License //
-// as published by the Free Software Foundation. //
-// //
-// This program is distributed in the hope that it will be useful, but //
-// WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
-// General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program. If not, see . //
-// //
-// Written by Francois Fleuret //
-// (C) Idiap Research Institute //
-// //
-// Contact for comments & bug reports //
-///////////////////////////////////////////////////////////////////////////
+/*
+ * folded-ctf is an implementation of the folded hierarchy of
+ * classifiers for object detection, developed by Francois Fleuret
+ * and Donald Geman.
+ *
+ * Copyright (c) 2008 Idiap Research Institute, http://www.idiap.ch/
+ * Written by Francois Fleuret
+ *
+ * This file is part of folded-ctf.
+ *
+ * folded-ctf is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * folded-ctf is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with folded-ctf. If not, see .
+ *
+ */
#include "error_rates.h"
#include "fusion_sort.h"
@@ -82,7 +86,6 @@ void print_decimated_error_rate(int level, LabelledImagePool *pool, Detector *de
if(global.write_parse_images) {
char buffer[buffer_size];
sprintf(buffer, "%s/parse-%04d.png", global.result_path, i);
- cout << "LEVEL = " << level << endl;
write_image_with_detections(buffer,
image,
&result_cell_set, level);
@@ -107,32 +110,3 @@ void print_decimated_error_rate(int level, LabelledImagePool *pool, Detector *de
<< "INFO TOTAL_SURFACE " << total_surface << endl;
;
}
-
-void parse_scene(Detector *detector, const char *image_name) {
- RGBImage tmp;
- tmp.read_jpg(image_name);
- RichImage image(tmp.width(), tmp.height());
-
- for(int y = 0; y < tmp.height(); y++) {
- for(int x = 0; x < tmp.width(); x++) {
- image.set_value(x, y, int(scalar_t(tmp.pixel(x, y, 0)) * 0.2989 +
- scalar_t(tmp.pixel(x, y, 1)) * 0.5870 +
- scalar_t(tmp.pixel(x, y, 2)) * 0.1140));
- }
- }
-
- image.compute_rich_structure();
-
- PoseCellScoredSet cell_set;
- detector->parse(&image, &cell_set);
- cell_set.decimate_hit(detector->nb_levels() - 1);
-
- cout << "RESULT " << image_name << endl;
- for(int c = 0; c < cell_set.nb_cells(); c++) {
- cout << "ALARM " << c << endl;
- Pose alarm;
- cell_set.get_cell(c)->get_centroid(&alarm);
- alarm.print(&cout);
- }
- cout << "END_RESULT" << endl;
-}