DetectText icon indicating copy to clipboard operation
DetectText copied to clipboard

in line 528... and after

Open gszeleczki opened this issue 12 years ago • 3 comments

...&&((_ptr)/right <= 3.0 || right/(_ptr) <= 3.0)

Correct me if I am wrong, but this is always true. If You have two real numbers, like 'a' and 'b', a/b or b/a should be less than 1. I think because of this, things get connected which should not be, and we will have huge components.

gszeleczki avatar Dec 17 '13 20:12 gszeleczki

:+1: This definitely seems to be the case. It seems like you want to check to make sure the values are close to each other, but I'm not sure if that's what they're trying to do.

Perhaps ((*ptr) / right <= 3.0) && (right / (*ptr) <= 3.0)? This would ensure that (*ptr) and right are within a factor of 3 of each other.

achalddave avatar Apr 29 '14 05:04 achalddave

I believe that @achalddave has it right. You will probably need to adjust the other filters if you make this change. I haven't had a chance to test it.

The other piece of feedback I've gotten is to add a check for a minimum height on each component (line 697).

aperrault avatar Apr 29 '14 20:04 aperrault

I've also had luck with eroding the components by a small value and seeing if they still exist; this is not in the paper, but it performed better than the height check as it also gets rid of thin diagonal lines (https://github.com/achalddave/Kannada-Text-Detection/commit/ba0eb48003d55e81201af64c5608f7227f01cf8c)

achalddave avatar May 09 '14 21:05 achalddave