diff --git a/fourcell/calibrate.py b/fourcell/calibrate.py index 1ffc941..5f944b9 100644 --- a/fourcell/calibrate.py +++ b/fourcell/calibrate.py @@ -102,7 +102,7 @@ topHalfPts = find_in_half(topHalf) thpts = group_points(topHalfPts) for pt in thpts : #print(f'{ttlx + pt[0]},{ttly + pt[1]}') - marks.append((ttlx + pt[0], ttly + pt[1],)) + marks.append((ttlx + pt[0] + round(w / 2), ttly + pt[1] + round(h / 2),)) print(f'Found {len(thpts)} points') #display(topHalf) @@ -114,7 +114,12 @@ bottomHalfPts = find_in_half(bottomHalf) bhpts = group_points(bottomHalfPts) for pt in bhpts : #print(f'{btlx + pt[0]},{btly + pt[1]}') - marks.append((btlx + pt[0], btly + pt[1], )) + marks.append((btlx + pt[0] + round(w / 2), btly + pt[1] + round(h / 2), )) + +clean = original.copy() +for pt in marks : + print(pt) + cv2.circle(clean, pt, 50, (0,0,255), -1) print(f'Found {len(bhpts)} points') @@ -128,3 +133,4 @@ print(find_closest((width,0,), marks)) print(find_closest((0,height,), marks)) print(find_closest((width,height,), marks)) +display(clean)