개정판 fdbc9ca0
issue #663: fix ai position cal
Change-Id: I326fb4e7242f5be57e65fd93ddaa63a091263aac
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
2411 | 2411 |
sow, soh = symGray.shape[::-1] |
2412 | 2412 |
|
2413 | 2413 |
# symbol is bigger than roi -> detected symbol area is too big |
2414 |
if rect[3] * rect[4] > sow * soh * 1.6:
|
|
2414 |
if rect[3] * rect[4] > sow * soh * 1.8:
|
|
2415 | 2415 |
return (None, None, None, None, None, None, None) |
2416 | 2416 |
# detected symbol area is too small |
2417 |
elif rect[3] * rect[4] * 1.6 < sow * soh:
|
|
2417 |
elif rect[3] * rect[4] * 1.8 < sow * soh:
|
|
2418 | 2418 |
return (None, None, None, None, None, None, None) |
2419 | 2419 |
|
2420 | 2420 |
# get Rotated Original Point |
... | ... | |
2464 | 2464 |
#colCount = len(tmRes[0]) |
2465 | 2465 |
#col, row = divmod(maxIndex, colCount) |
2466 | 2466 |
|
2467 |
if max_val > symbolThreshold * 0.8:
|
|
2467 |
if max_val > 0.1:
|
|
2468 | 2468 |
searchedInfos.append([max_val, max_loc[0] + x_start, max_loc[1] + y_start, symbolRotatedAngle, flipped, originalPoint, connectionPoint, sw, sh]) |
2469 | 2469 |
|
2470 | 2470 |
symGray = cv2.rotate(symGray, cv2.ROTATE_90_CLOCKWISE) |
내보내기 Unified diff