프로젝트

일반

사용자정보

개정판 3442f8e9

ID3442f8e9a112d5d5a836d1ccc26132409fd6888c
상위 141ec96a
하위 5e36f3a9

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

issue #506: fix text area

Change-Id: Ia88b3276c3dac9b883f322fac8f174778b7e67d4

차이점 보기:

DTI_PID/DTI_PID/tesseract_ocr_module.py
207 207
            # up to here
208 208
            if minSize <= rect.height() <= maxSize:  # TODO: 이 부분이 필요한가?
209 209
                if long_img:
210
                    text_rect = QRect(rect.left() + offset_x - thickness, rect.top() + offset_y - thickness, int(rect.width()/ 3), rect.height())
210
                    text_rect = QRect(rect.left() + offset_x, rect.top() + offset_y, int(rect.width()/ 3), rect.height())
211 211
                else:
212
                    text_rect = QRect(rect.left() - thickness, imgHeight - rect.bottom() - thickness, rect.width(), rect.height())
213
                    
212
                    text_rect = QRect(rect.left(), imgHeight - rect.bottom(), rect.width(), rect.height())
213

  
214 214
                if text_rect.width() < 5 or text_rect.height() < 5:
215 215
                    continue
216 216
                if angle == 90 or angle == 270:
......
220 220
                    transform.translate(-imgWidth * 0.5, -imgHeight * 0.5)
221 221
                    text_rect = transform.mapRect(text_rect)
222 222

  
223
                text_info = ti.TextInfo(text_filter(text), startPoint[0] + text_rect.left(),
224
                                        startPoint[1] + text_rect.top(),
223
                text_info = ti.TextInfo(text_filter(text), startPoint[0] + text_rect.left() - thickness,
224
                                        startPoint[1] + text_rect.top() - thickness,
225 225
                                        text_rect.width(), text_rect.height(), angle)
226 226
                textInfoList.append(text_info)
227 227

  

내보내기 Unified diff

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