You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a system that captures the small movements of a user's hand or face via a webcam and translates these movements to control the cursor on a computer screen. This requires interpolating the smaller, captured movements to a larger scale suitable for screen coordinates.
Like:
defmap_coordinates(x, y, src_width, src_height, dst_width, dst_height):
""" Map coordinates from source dimensions to destination dimensions. :param x: X coordinate in source :param y: Y coordinate in source :param src_width: Width of source :param src_height: Height of source :param dst_width: Width of destination :param dst_height: Height of destination :return: (new_x, new_y) in destination """new_x=int((x/src_width) *dst_width)
new_y=int((y/src_height) *dst_height)
returnnew_x, new_y
The text was updated successfully, but these errors were encountered:
Implement a system that captures the small movements of a user's hand or face via a webcam and translates these movements to control the cursor on a computer screen. This requires interpolating the smaller, captured movements to a larger scale suitable for screen coordinates.
Like:
The text was updated successfully, but these errors were encountered: