개정판 a10a2ee1
issue #000: symbol data
Change-Id: I6268b1256c10ec276d5fce7b703e76273c5d7f0b
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
325 | 325 |
|
326 | 326 |
_img = appDocData.imgSrc[round(item.getSp()[1]):round(item.getSp()[1]+item.getHeight()), round(item.getSp()[0]):round(item.getSp()[0]+item.getWidth())] |
327 | 327 |
cv2.imwrite(os.path.join(path, str(uuid.uuid4()) + '.png'), _img) |
328 |
return
|
|
328 |
continue
|
|
329 | 329 |
|
330 | 330 |
pool = futures.ThreadPoolExecutor(max_workers = THREAD_MAX_WORKER) |
331 | 331 |
|
... | ... | |
933 | 933 |
isDetectOnOrigin, symbolRotateCount, symbolOcrOption, isContainChild , |
934 | 934 |
originalPoint, connectionPoint, baseSymbol, additionalSymbol, isExceptDetect, detectFlip=1 if index is 1 else 0) |
935 | 935 |
threadLock.release() |
936 |
## 현재 심볼과 검출된 심볼이 같지 않을 경우 (교체) |
|
936 | 937 |
elif not forTraining: |
937 | 938 |
searchedSymbol = searchedSymbolList[symbolIndex] |
938 | 939 |
symbolHitRate = searchedSymbol.getHitRate() |
... | ... | |
945 | 946 |
'/'.join('{},{},{},{}'.format(param[0], param[1], param[2], param[3]) for param in connectionPoint), |
946 | 947 |
baseSymbol, additionalSymbol,isExceptDetect, detectFlip=1 if index is 1 else 0) |
947 | 948 |
threadLock.release() |
949 |
# 학습용 데이터 생성을 위해 교체하지 않고 추가함 |
|
950 |
elif forTraining: |
|
951 |
threadLock.acquire() |
|
952 |
foundSymbolCount = foundSymbolCount + 1 |
|
953 |
Worker.addSearchedSymbol(symbolName, symbolType , |
|
954 |
searchedItemSp, sw, sh, symbolThreshold, symbolMinMatchCount, hitRate, symbolRotatedAngle , |
|
955 |
isDetectOnOrigin, symbolRotateCount, symbolOcrOption, isContainChild , |
|
956 |
originalPoint, connectionPoint, baseSymbol, additionalSymbol, isExceptDetect, detectFlip=1 if index is 1 else 0) |
|
957 |
threadLock.release() |
|
948 | 958 |
|
949 | 959 |
## Rotate Symbol |
950 | 960 |
symGray = cv2.rotate(symGray, cv2.ROTATE_90_COUNTERCLOCKWISE) |
내보내기 Unified diff