Open amitdo opened 8 years ago
It looks that the function select_regions
is defined two times:
ocropus-nlbin
: https://github.com/tmbdev/ocropy/blob/dd02fccf28b7b5fe7db6386044ca79fbcb194b01/ocropus-nlbin#L87ocrolib/morph.py
: https://github.com/tmbdev/ocropy/blob/fe8d84984668ded645c4969f019f875d402c13a4/ocrolib/morph.py#L189The second one is also used in ocropus-gpageseg
, see https://github.com/tmbdev/ocropy/search?utf8=%E2%9C%93&q=select_regions .
What would you suggest to do?
Hi Philipp!
Assuming the two select_regions
are identical, you can remove the one in ocropus-nlbin
.
To solve the original issue I reported, in ocropus-nlbin
you should import morph
and call the function somewhere.
def select_regions(binary,f,min=0,nbest=100000)
Robust Binarization of Stereo and Monocular Document Images Using Percentile Filter In this paper, there is a text area detection phase (figure 2f).