프로젝트

일반

사용자정보

개정판 ae485d03

IDae485d039aca62352187b3639bcd9ef145cbb5f8
상위 5e1adb5c
하위 8a22a0ed

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

issue #506: fix img lost

Change-Id: Ia791b8c97fab8e6ac0257f27bedb9e169b499e23

차이점 보기:

DTI_PID/DTI_PID/OcrResultDialog.py
236 236
                else:
237 237
                    self.ui.detectResultTextEdit.setText(self.tr("Not Found"))
238 238
            else:
239
                cv_image = cv2.threshold(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY), 200, 255, cv2.THRESH_BINARY)[1]
239
                cv_image = cv2.threshold(cv2.cvtColor(self.img_ocr, cv2.COLOR_BGR2GRAY), 200, 255, cv2.THRESH_BINARY)[1]
240 240
                # contours 추출
241 241
                contours, _ = cv2.findContours(cv_image, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
242 242
                text_info_list = []
......
249 249
                                           and text_info.contains(_text_info.center)])]
250 250

  
251 251
                detector = TextDetector()
252
                detector.recognizeText(img, (0, 0), text_info_list, None, None, None, None, onlyTextArea=True)
252
                detector.recognizeText(self.img_ocr, (0, 0), text_info_list, None, None, None, None, onlyTextArea=True)
253 253
                self.textInfoList = detector.textInfoList.copy()
254 254
                self.textInfoList.sort(key=lambda x: x.getY())
255 255

  

내보내기 Unified diff

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