Created
October 29, 2022 23:26
-
-
Save victormurcia/8a896230f41fd2b096ff94b08dc9b266 to your computer and use it in GitHub Desktop.
get_pixel_coords for blade coater alignment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StoreCoordinates: | |
def __init__(self): | |
self.points = [] | |
def select_point(self,event,x,y,flags,param): | |
if event == cv2.EVENT_LBUTTONDOWN: | |
# Display the clicked coordinates on shell | |
print(x, ' ', y) | |
# displaying the coordinates on the image window | |
font = cv2.FONT_HERSHEY_SCRIPT_SIMPLEX | |
text = str(x) + ',' + str(y) | |
cv2.putText(copy, text, (x,y), font, 0.5, (255, 255, 255), 2) | |
cv2.imshow('Blade-Coater Alignment', copy) | |
self.points.append((x,y)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment