프로젝트

일반

사용자정보

개정판 80d6cd66

ID80d6cd667331e4c6abf0df812d1a1c51336cefd2
상위 227e6ded
하위 d2ccfaf7

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

issue #665: find err reason

차이점 보기:

DTI_PID/DTI_PID/OcrResultDialog.py
134 134
            #cv2.destroyAllWindows()
135 135

  
136 136
            # up to here
137
            self.textInfoList = TOCR.getTextInfo(img, (round(self.boundingBox.x()), round(self.boundingBox.y())), self)
137
            self.textInfoList = TOCR.getTextInfo(img, (round(self.boundingBox.x()), round(self.boundingBox.y())))
138 138

  
139 139
            #self.textInfoList = TOCR.getTextInfo(img, (int(self.boundingBox.x()), int(self.boundingBox.y())))
140 140
            if self.textInfoList is not None and len(self.textInfoList) > 0:
DTI_PID/DTI_PID/tesseract_ocr_module.py
184 184
                2018.06.20  Jeongwoo    Remove variable [lastCharHeight] / Change variable [cey], [ch] / Change method to calculate text line height
185 185
                humkyung 2018.10.12 change logic to extract text which first get bounding box and then extract character
186 186
"""
187
def getTextInfo(img, startPoint, form = None, angle = 0, flag = FLAG_IMAGE_TO_BOXES, conf = DEFAULT_CONF):
188
    if form is not None:
189
        docData = AppDocData.instance()
190
        QMessageBox.question(form, 'tesseract', os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Tesseract-OCR', 'tesseract.exe'), QMessageBox.Yes, QMessageBox.Cancel)
191
        QMessageBox.question(form, 'tesseract', os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Tesseract-OCR', 'tesseract.exe'), QMessageBox.Yes, QMessageBox.Cancel)
187
def getTextInfo(img, startPoint, angle = 0, flag = FLAG_IMAGE_TO_BOXES, conf = DEFAULT_CONF):
188
    #if form is not None:
189
    #    docData = AppDocData.instance()
190
    #    QMessageBox.question(form, 'tesseract', os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Tesseract-OCR', 'tesseract.exe'), QMessageBox.Yes, QMessageBox.Cancel)
191
    #    QMessageBox.question(form, 'tesseract', os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Tesseract-OCR', 'tesseract.exe'), QMessageBox.Yes, QMessageBox.Cancel)
192 192
    try:
193 193
        textInfoList = []
194 194

  

내보내기 Unified diff

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