개정판 80d6cd66
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