import math


def calculate_angle(elx, ely, erx, ery): 
    """
    calculate image rotate angle
    :param elx: lefy eye x
    :param ely: left eye y
    :param erx: right eye x
    :param ery: right eye y
    :return: rotate angle
    """ 
    dx = erx - elx 
    dy = ery - ely 
    angle = math.atan(dy / dx) * 180 / math.pi 
    return angle