개정판 9f27c190
issue #501: move line detect into executeRecognition
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
78 | 78 |
def procCounter(self): # A slot takes no params |
79 | 79 |
try: |
80 | 80 |
if self.isSymbolChecked or self.isTextChecked: |
81 |
Worker.executeRecognition(self.drawDetectedItems, self.path, self.listWidget, self) |
|
81 |
Worker.executeRecognition(self.drawDetectedItems, self.path, self.listWidget, self.isLineChecked, self.drawDetectedLines, self)
|
|
82 | 82 |
|
83 |
if self.isLineChecked: |
|
84 |
Worker.recognizeLine(self.drawDetectedLines, self.path, self.listWidget, self.graphicsView, self) |
|
83 |
#if self.isLineChecked:
|
|
84 |
# Worker.recognizeLine(self.drawDetectedLines, self.path, self.listWidget, self.graphicsView, self)
|
|
85 | 85 |
except Exception as ex: |
86 | 86 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
87 | 87 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
... | ... | |
169 | 169 |
MainWindow.instance().displayMessage.emit(MessageType.Error, message) |
170 | 170 |
|
171 | 171 |
@staticmethod |
172 |
def executeRecognition(drawDetectedItems, path, listWidget, worker): |
|
172 |
def executeRecognition(drawDetectedItems, path, listWidget, isLineChecked, drawDetectedLines, worker):
|
|
173 | 173 |
""" |
174 | 174 |
@brief Main function |
175 | 175 |
@author Jeongwoo |
... | ... | |
351 | 351 |
drawDetectedItems.emit(searchedSymbolList, textInfoList, otherTextInfoList if otherTextInfoList is not None else [], titleBlockTextInfoList if titleBlockTextInfoList is not None else [], loop) |
352 | 352 |
loop.exec_() |
353 | 353 |
## up to here |
354 |
|
|
355 |
if isLineChecked: |
|
356 |
Worker.recognizeLine(drawDetectedLines, mainRes, listWidget, worker.graphicsView, worker) |
|
357 |
|
|
354 | 358 |
except Exception as ex: |
355 | 359 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
356 | 360 |
worker.displayLog.emit(MessageType.Error, message) |
내보내기 Unified diff