개정판 27dd76da
issue #655: change method name
DTI_PID/DTI_PID/TrainingImageListDialog.py | ||
---|---|---|
436 | 436 |
boundaryOcrData = None |
437 | 437 |
if not isBoxFile: |
438 | 438 |
docData = AppDocData.instance() |
439 |
oCRLang = docData.getCurrentProject().getName() if TOCR.isTrainedData() else 'eng'
|
|
439 |
oCRLang = docData.getCurrentProject().getName() if TOCR.existTrainedData() else 'eng'
|
|
440 | 440 |
whiteCharList = docData.getConfigs('Text Recognition', 'White Character List') |
441 | 441 |
if len(whiteCharList) is 0: |
442 | 442 |
boundaryOcrData = pytesseract.image_to_boxes(drawing, config=TOCR.DEFAULT_CONF, lang=oCRLang) |
DTI_PID/DTI_PID/tesseract_ocr_module.py | ||
---|---|---|
40 | 40 |
--psm 6 -c tessedit_char_whitelist=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-~.,/!@#$%&*(){}[]<>:;+=?\\" |
41 | 41 |
""" |
42 | 42 |
|
43 |
def isTrainedData():
|
|
43 |
def existTrainedData():
|
|
44 | 44 |
''' |
45 | 45 |
@brief check trained data is exist |
46 | 46 |
@author euisung |
... | ... | |
78 | 78 |
conf = '--psm 6 -c tessedit_char_whitelist=' + conf |
79 | 79 |
|
80 | 80 |
docData = AppDocData.instance() |
81 |
oCRLang = docData.getCurrentProject().getName() if isTrainedData() else 'eng'
|
|
81 |
oCRLang = docData.getCurrentProject().getName() if existTrainedData() else 'eng'
|
|
82 | 82 |
|
83 | 83 |
configs = docData.getConfigs('Text Size', 'Min Text Size') |
84 | 84 |
minSize = int(configs[0].value) if 1 == len(configs) else 30 |
내보내기 Unified diff