개정판 7c3cdd0b
issue #663: fix dilate
Change-Id: I5ed54e69f10532829f455ea1a196dd4612515f67
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
1501 | 1501 |
appDocData = AppDocData.instance() |
1502 | 1502 |
if os.path.isfile(orgImagePath) and os.path.isfile(recImagePath): |
1503 | 1503 |
imgOriginal = cv2.threshold(Worker.cvtGrayImage(cv2.imread(orgImagePath, 1)), 127, 255, cv2.THRESH_BINARY)[1] |
1504 |
|
|
1505 |
configs = appDocData.getConfigs('Filter', 'DilateSize') |
|
1506 |
if 1 == len(configs) and int(configs[0].value) is not 0: |
|
1507 |
size = int(configs[0].value) |
|
1508 |
kernel = np.ones((size, size), np.uint8) |
|
1509 |
imgOriginal = cv2.erode(imgOriginal, kernel, iterations=1) |
|
1510 |
|
|
1504 | 1511 |
# remove not drawing area |
1505 | 1512 |
configs = appDocData.getConfigs('{} Equipment Desc Area'.format(appDocData.imgName)) |
1506 | 1513 |
for config in configs: |
내보내기 Unified diff