API Documentation - cheeseBG/EmergencyResponseSystem GitHub Wiki

Hand Sign

Our Hand Sign Algorithm

  1. Each finger is distinguished by calculating whether it is bent or straight.

  2. It tracks the position of the point under the palm to distinguish whether it is a right or left hand.

  3. When using the left hand, the pre-mapped command is executed according to the number of bent fingers.

Mapped Command

API

from lib.handsign.gesture import *

handedness(Float right_wrist_x_coordinates,Float left_wrist_x_coordinates)

  • Parameter : 'x' coordinates of both wrist
  • Return : String 'left' or 'right'

get_degree(List vector_1, List vector_2)

  • Parameter : vector_1 & vector_2(calculated by three coordinates containing one finger)
  • Return : Float degree

bent_or_straight(Float degree, Int thumb_check)

  • Parameter : degree of finger, thumb_check(thumb = 1, none thumb = 0)
  • Return : Int 1(bent) or 0(straight)

define_gesture(List hand_coordinates_list):

  • Parameter : List of 21 hand coordinates(x, y)
  • Return : List hand_state_info(Consist with five bent_or_straight info elements. It is listed in order from thumb to pinky.) (e.g., [0,0,0,0,0] means that all fingers are straight.)

find_gesture(List hand_state_info, String handedness):

  • Parameter : hand_state_info & handedness(both are described above)
  • Return : String (Commands specified 'Mapping result' table)

SR

API

from lib.sr.SR_edsr import sr_work

sr_work():

  • Parameter : None
  • Return : Save the upscaled image(PNG format)

Result

[Input Image]

[Upscaled Image]