Commit e31b7016 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Disable some debug output.

	* text/clean_inplace.hh,
	* text/recognition.hh: Disable some debug output.
parent 9e66b0bc
2010-07-06 Guillaume Lazzara <z@lrde.epita.fr>
Disable some debug output.
* text/clean_inplace.hh,
* text/recognition.hh: Disable some debug output.
2010-07-06 Guillaume Lazzara <z@lrde.epita.fr> 2010-07-06 Guillaume Lazzara <z@lrde.epita.fr>
Add a tool for text recognition in natural pictures. Add a tool for text recognition in natural pictures.
scribo/src/Makefile.am: Add a new rule. * src/Makefile.am: Add a new rule.
scribo/src/text_recognition_in_picture.cc: New. * src/text_recognition_in_picture.cc: New.
2010-07-06 Guillaume Lazzara <z@lrde.epita.fr> 2010-07-06 Guillaume Lazzara <z@lrde.epita.fr>
Add text::look_like_text_lines. Add text::look_like_text_lines.
* scribo/text/look_like_text_lines.hh: New. * text/look_like_text_lines.hh: New.
* scribo/text/merging.hh: Make use of * text/merging.hh: Make use of
text::look_like_text_lines. text::look_like_text_lines.
2010-06-30 Arthur Crepin-Leblond <crepin@stockholm.lrde.epita.fr> 2010-06-30 Arthur Crepin-Leblond <crepin@stockholm.lrde.epita.fr>
......
...@@ -111,11 +111,11 @@ namespace scribo ...@@ -111,11 +111,11 @@ namespace scribo
return; return;
float fact = line.x_height() / 40.0f; float fact = line.x_height() / 40.0f;
std::cout << fact << " - " << input.domain() << std::endl; // std::cout << fact << " - " << input.domain() << std::endl;
if (fact < 1) if (fact < 1)
{ {
std::cout << "Upsampling..." << " - " // std::cout << "Upsampling..." << " - "
<< fact << std::endl; // << fact << std::endl;
while (fact < 0.90) while (fact < 0.90)
{ {
input = scribo::upsampling::eagle(input); // 2x upsampling input = scribo::upsampling::eagle(input); // 2x upsampling
...@@ -127,13 +127,13 @@ namespace scribo ...@@ -127,13 +127,13 @@ namespace scribo
} }
else if (fact > 2.5f) else if (fact > 2.5f)
{ {
std::cout << "subsampling::bilinear" << " - " // std::cout << "subsampling::bilinear" << " - "
<< std::ceil(fact) << std::endl; // << std::ceil(fact) << std::endl;
input = subsampling::bilinear(input, std::ceil(fact - 0.5)); // math::floor instead? input = subsampling::bilinear(input, std::ceil(fact - 0.5)); // math::floor instead?
} }
else // else
std::cout << "not clean_inplaceing text. Seems ok." << std::endl; // std::cout << "not clean_inplaceing text. Seems ok." << std::endl;
trace::exiting("scribo::text::clean_inplace"); trace::exiting("scribo::text::clean_inplace");
} }
......
...@@ -121,9 +121,9 @@ namespace scribo ...@@ -121,9 +121,9 @@ namespace scribo
if (! lines(i).is_valid() || lines(i).tag() != line::None || lines(i).type() != line::Text) if (! lines(i).is_valid() || lines(i).tag() != line::None || lines(i).type() != line::Text)
continue; continue;
std::cout << "Text recognition... (" // std::cout << "Text recognition... ("
<< i << "/" << lines.nelements() << ")" << std::endl; // << i << "/" << lines.nelements() << ")" << std::endl;
std::cout << "x_height = " << lines(i).x_height() << std::endl; // std::cout << "x_height = " << lines(i).x_height() << std::endl;
mln_domain(I) box = lines(i).bbox(); mln_domain(I) box = lines(i).bbox();
...@@ -175,7 +175,7 @@ namespace scribo ...@@ -175,7 +175,7 @@ namespace scribo
if (s != 0) if (s != 0)
{ {
std::cerr << s << std::endl; // std::cerr << s << std::endl;
std::string str(s); std::string str(s);
str = str.substr(0, str.length() - 2); str = str.substr(0, str.length() - 2);
lines(i).update_text(str); lines(i).update_text(str);
...@@ -232,7 +232,7 @@ namespace scribo ...@@ -232,7 +232,7 @@ namespace scribo
if (s != 0) if (s != 0)
{ {
std::cout << s << std::endl; // std::cout << s << std::endl;
if (!output_file.empty()) if (!output_file.empty())
{ {
std::string str(s); std::string str(s);
......
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