Work on normalization script
This commit is contained in:
parent
9e11d95447
commit
2798729373
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "scale=2;${1}+((${2}-${1})/2.0)" | bc
|
|
@ -24,7 +24,7 @@ def display (image) :
|
|||
resized = image_resize(image, 800, 800)
|
||||
cv2.imshow('img', resized)
|
||||
|
||||
while True:
|
||||
while cv2.getWindowProperty('img', cv2.WND_PROP_VISIBLE) > 0:
|
||||
key = cv2.waitKey(0)
|
||||
if key == 27:
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -244,7 +244,7 @@ def find_hole_punches (img) :
|
|||
i = 0
|
||||
for hp in holePunches :
|
||||
hp['order'] = i
|
||||
#cv2.putText(img, str(i + 1), (hp['x'], hp['y']), cv2.FONT_HERSHEY_SIMPLEX, 20, (0, 0, 255), 5, cv2.LINE_AA, False)
|
||||
cv2.putText(img, str(i + 1), (hp['x'], hp['y']), cv2.FONT_HERSHEY_SIMPLEX, 20, (0, 0, 255), 5, cv2.LINE_AA, False)
|
||||
i+=1
|
||||
|
||||
return holePunches
|
||||
|
@ -382,7 +382,7 @@ print(f'Offset: {offset[0]},{offset[1]}')
|
|||
|
||||
|
||||
|
||||
|
||||
display(img)
|
||||
#normal = place(blank, rotated, 0, 0)
|
||||
|
||||
#display(normal)
|
Loading…
Reference in New Issue