개정판 8c26ccb2
issue #1366: fix lost roi of image
Change-Id: Ie386fa6620fb64e81ed76b30400c7cbf9b7387d2
DTI_PID/DTI_PID/ReplaceSymbolDialog.py | ||
---|---|---|
92 | 92 |
|
93 | 93 |
cmd = ReplaceInsertCommand() |
94 | 94 |
cmd.display_message.connect(App.mainWnd().onAddMessage) |
95 |
cmd.excute(scene, find_symbol, replace_symbol, replace_action, condition, custom=custom) |
|
95 |
cmd.execute(scene, find_symbol, replace_symbol, replace_action, condition, custom=custom)
|
|
96 | 96 |
|
97 | 97 |
def reject(self): |
98 | 98 |
"""close a dialog""" |
DTI_PID/DTI_PID/TextDetector.py | ||
---|---|---|
270 | 270 |
configs = app_doc_data.getConfigs('Text Size', 'Max Text Size') |
271 | 271 |
maxTextSize = int(configs[0].value) if 1 == len(configs) else 100 |
272 | 272 |
configs = app_doc_data.getConfigs('Text Size', 'Min Text Size') |
273 |
minSize = int(configs[0].value) if 1 == len(configs) else 28
|
|
273 |
minSize = int(configs[0].value) if 1 == len(configs) else 15
|
|
274 | 274 |
if minSize < 28: |
275 |
minSize = 28
|
|
275 |
minSize += 13
|
|
276 | 276 |
|
277 | 277 |
binary_image = cv2.threshold(ocr_image, 200, 255, cv2.THRESH_BINARY)[1] |
278 | 278 |
|
DTI_PID/WebServer/symbol_recognition/test_doftech_all_images.py | ||
---|---|---|
281 | 281 |
image = Image.open(image) |
282 | 282 |
(img_h, img_w) = image.size |
283 | 283 |
|
284 |
width, height = img_w, img_h |
|
285 |
width_count, height_count = width // patch_size + 1, height // patch_size + 1 |
|
286 |
b_width, b_height = width_count * patch_size, height_count * patch_size |
|
287 |
|
|
288 |
new_image = Image.new('RGB', (b_width + 1, b_height + 1), (255, 255, 255)) |
|
289 |
new_image.paste(image, image.getbbox()) |
|
290 |
image = new_image |
|
291 |
|
|
284 | 292 |
# crop 할 사이즈 : grid_w, grid_h |
285 | 293 |
grid_w = patch_size # crop width |
286 | 294 |
grid_h = patch_size # crop |
내보내기 Unified diff