subokita / Robust-Text-Detection

Robust Text Detection implementation based on http://www.stanford.edu/~hchen2/papers/ICIP2011_RobustTextDetection.pdf
MIT License
157 stars 80 forks source link

Why does it have trouble with small fonts? #10

Open PhilAndrew opened 9 years ago

PhilAndrew commented 9 years ago

Hi there, this is a really good text detector. However, why does it have trouble with small font size? For example, in this image some characters are missed.

Are there any tuning parameters I can change to help it along?

smaltext

subokita commented 9 years ago

Hi Phil, here are the params I used in Robust Text Detection:

param.minMSERArea        = 10;
param.maxMSERArea        = 400;
param.cannyThresh1       = 30;
param.cannyThresh2       = 100;

param.maxConnCompCount   = 3000;
param.minConnCompArea    = 35;
param.maxConnCompArea    = 300;

param.minEccentricity    = 0.4;
param.maxEccentricity    = 0.995;
param.minSolidity        = 0.2;
param.maxStdDevMeanRatio = 0.5;

For smaller text, you need to tweak almost every parameters above, but I'd say, getting a larger image with larger text might be a better decision. Sadly when the text is too small, then it's hard to see the difference between the boundaries of each letter, or the 'hole' of certain letters. Text detection is still similar to how our brain trying to process text, we still need to distinguish between text and the background, we still need to squint when the text is too small.

ghost commented 9 years ago

why i can not change TestText.png to another picture,when i change picture ,it throw out a error,like this

image