opencv - Segment character of complicate background -


in optical character recognition (ocr), facing problem of segmenting characters on noisy/complicated background image. have tried 1 easiest image among 3 (as think) attached here. also, have tried contrast enhancement (histogram equalization) since images low contrast. however, segmented characters still have poor quality: connected character, unfilled regions , can not work other images due fixed thresholds.

    scalar m = mean(src);     ( y = 0; y < src.rows; y++ )     {         ( x = 0; x < src.cols; x ++ )         {             if ( filtered_image.at<uchar>(y,x) > 160 )             {                 filtered_image.at<uchar>(y, x) = (uchar) m(0);             }         }     }     gaussianblur(filtered_image, filtered_image, size(5, 5), 1, 1, 4);     imshow("filtered", filtered_image);      hardthresholding(filtered_image, filtered_image, 70);     imshow("threshold", filtered_image); 
  1. remove bright spots assigning image average value pixels greater threshold (ex: 180).
  2. gaussian blurring remove noise.
  3. hard thresholding respect fixed threshold value.

if can suggest ideas, if great.

first image result of first image

second image

third image

you try mser (maximally stable extremal regions) blob detection. vlfeat open source library includes implementation of mser.

there entire scientific competition devoted text segmentation. turns out many of methods utilize mser part of processing pipeline.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -