Commit 6c791fef authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Fix various warnings.

	* scribo/binarization/otsu_threshold.hh: Fix comparisons between
	different types.

	* scribo/io/xml/load.hh: Convert to float.

	* scribo/text/paragraphs_closing.hh,
	* scribo/text/recognition.hh,
	* src/afp/components.hh: Remove unused variables.

	* src/binarization/otsu.cc: Silent warning.

	* src/misc/morpho.cc: Check number of arguments.
parent ab034432
2013-02-26 Guillaume Lazzara <z@lrde.epita.fr>
Fix various warnings.
* scribo/binarization/otsu_threshold.hh: Fix comparisons between
different types.
* scribo/io/xml/load.hh: Convert to float.
* scribo/text/paragraphs_closing.hh,
* scribo/text/recognition.hh,
* src/afp/components.hh: Remove unused variables.
* src/binarization/otsu.cc: Silent warning.
* src/misc/morpho.cc: Check number of arguments.
2013-02-26 Guillaume Lazzara <z@lrde.epita.fr>
* common.mk: Fix include paths order.
......
// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -78,7 +79,7 @@ namespace scribo
/* calculation of probability density */
util::array<double> pdf(hist.nvalues()); //probability distribution
for(int i = 0; i< maxval; ++i)
for(unsigned i = 0; i< maxval; ++i)
pdf[i] = (double)hist[i] / nsites;
......@@ -89,7 +90,7 @@ namespace scribo
cdf[0] = pdf[0];
myu[0] = 0.0; /* 0.0 times prob[0] equals zero */
for(int i = 1; i < maxval; ++i)
for(unsigned i = 1; i < maxval; ++i)
{
cdf[i] = cdf[i-1] + pdf[i];
myu[i] = myu[i-1] + i*pdf[i];
......
......@@ -284,7 +284,7 @@ namespace scribo
line_data = new scribo::internal::line_info_data<L>(lines, mln::util::array<component_id_t>());
line_data->text_ = atts.value("text").toUtf8().constData();
line_data->text_confidence_ = atts.value("textConfidence").toUtf8().constData();
line_data->text_confidence_ = atof(atts.value("textConfidence").toUtf8().constData());
line_data->hidden_ = false;
line_data->tag_ = static_cast<line::Tag>(atts.value("tag").toInt());
......
// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
......@@ -209,7 +209,6 @@ namespace scribo
const paragraph_info<L>& current_par = parset(p);
const mln::util::array<line_id_t>& line_ids = current_par.line_ids();
line_id_t last_id = line_ids[0];
for_all_elements(i, line_ids)
{
const line_id_t& line_id = line_ids(i);
......@@ -233,8 +232,6 @@ namespace scribo
last_comp = c;
}
// mln::draw::line(debug, current_line.bbox().pcenter(), lines(last_id).bbox().pcenter(), p);
// last_id = line_id;
}
int delta_baseline = current_par.delta_baseline();
......
......@@ -385,8 +385,6 @@ namespace scribo
if (!output_file.empty())
file.open(output_file.c_str());
mln_domain(I) box = line.domain();
// Recognize characters.
char* s = tess.TesseractRect(
(unsigned char*) &line(line.domain().pmin()),
......
// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -132,7 +133,7 @@ namespace mln
image2d<info> data;
image2d<V> label;
V current_label = 0;
int N, dp_border;
int dp_border;
// util::timer time;
// time.start();
......@@ -140,7 +141,6 @@ namespace mln
// init
{
extension::adjust(input, nbh);
N = input.nelements();
dp_border = 2 * input.border();
extension::fill(input, false);
initialize(data, input);
......
// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -83,6 +84,7 @@ int main(int argc, char *argv[])
trace::entering("main");
bool verbose = options.is_set("verbose");
(void) verbose;
image2d<value::rgb8> input;
io::magick::load(input, options.arg("input.*"));
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -61,6 +62,12 @@ int main(int argc, char *argv[])
using value::label_8;
using value::rgb8;
if (argc != 2)
{
std::cout << "Usage: " << argv[0] << " <input.pbm>" << std::endl;
return 1;
}
image2d<bool> input;
io::pbm::load(input, argv[1]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment