
From: Jimmy Ma <jimmy.ma@lrde.epita.fr> To: olena-patches@lrde.epita.fr Subject: r2719: Update OCR preprocessing URL: https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena/sandbox ChangeLog: 2008-10-29 Jimmy Ma <jimmy.ma@lrde.epita.fr> Update OCR preprocessing. * garrigues/ocr/ocr_with_preprocess.cc: Apply gaussian blur and naive thresholding. --- ocr_with_preprocess.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Index: branches/cleanup-2008/milena/sandbox/garrigues/ocr/ocr_with_preprocess.cc =================================================================== --- branches/cleanup-2008/milena/sandbox/garrigues/ocr/ocr_with_preprocess.cc (revision 2718) +++ branches/cleanup-2008/milena/sandbox/garrigues/ocr/ocr_with_preprocess.cc (revision 2719) @@ -37,7 +37,7 @@ #include "resize.hh" #include "enlarge.hh" -//#include "skeleton.hh" +#include "skeleton.hh" #include <mln/linear/gaussian.hh> #include <mln/trace/all.hh> @@ -96,17 +96,17 @@ image2d<int_u8> output = enlarge(input, 1); // TODO CLEANUP -#if 0 +#if 1 // Blur. output = linear::gaussian(output, 1); #endif -#if 0 +#if 1 // Threshold mln_piter_(image2d<unsigned>) p(output.domain()); for_all(p) { - output(p) = output(p) > 127 ? 1 : 0; + output(p) = output(p) > 150 ? 255 : 0; } #endif