프로젝트

일반

사용자정보

개정판 ce628cea

IDce628cea0284df225d9e5131af8a1a2e93b93125
상위 a5b0df7c
하위 fede9b17

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

issue #1124: impove title block, added default text and multi-line text

Change-Id: Ibbc0d3ca4587631bbb2ade0167199ca132311edd

차이점 보기:

DTI_PID/DTI_PID/TextDetector.py
331 331
                for titleBlockProp in titleBlockProps:
332 332
                    area = Area(titleBlockProp[0])
333 333
                    area.parse(titleBlockProp[2])
334
                    img = imgSrc[round(area.y):round(area.y+area.height), round(area.x):round(area.x+area.width)]
335
                    if len(whiteCharList) is 0:
336
                        texts = TOCR.getTextInfo(img, (area.x, area.y), 0, language=appDocData.OCRData)
334
                    if not (titleBlockProp[3] and titleBlockProp[3] != ''):
335
                        img = imgSrc[round(area.y):round(area.y+area.height), round(area.x):round(area.x+area.width)]
336
                        if len(whiteCharList) is 0:
337
                            texts = TOCR.getTextInfo(img, (area.x, area.y), 0, language=appDocData.OCRData)
338
                        else:
339
                            texts = TOCR.getTextInfo(img, (area.x, area.y), 0, language='eng', conf=whiteCharList[0].value)
340
                        texts = [ti.TextInfo('\n'.join([textInfo.getText() for textInfo in texts]), area.x, area.y, area.width, area.height, 0)]
337 341
                    else:
338
                        texts = TOCR.getTextInfo(img, (area.x, area.y), 0, language='eng', conf=whiteCharList[0].value)
342
                        texts = [ti.TextInfo(titleBlockProp[3], area.x, area.y, area.width, area.height, 0)]
339 343
                    self.titleBlockTextInfoList.append([area.name, texts])
340 344

  
341 345
                if worker is not None: worker.updateProgress.emit(maxProgressValue, None)

내보내기 Unified diff

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