프로젝트

일반

사용자정보

개정판 27dd76da

ID27dd76da394956d945b8b938b5f976ad1aacf6f7
상위 99e0f49b
하위 5cf4d702

함의성이(가) 약 6년 전에 추가함

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

클립보드 이미지 추가 (최대 크기: 500 MB)