프로젝트

일반

사용자정보

개정판 9f27c190

ID9f27c190aaa91c2610be22aa9ef2e3d19f45020a
상위 936bbf2b
하위 6e953094

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

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

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