(orientation)
Guess upward vector in camera coordinates given the orientation tag.

    Assumes camera is looking towards the horizon and horizon is horizontal
    on the image when taking in to account the orientation tag.
Guess upward vector in camera coordinates given the orientation tag.
Guess upward vector in camera coordinates given the orientation tag .
def guess_acceleration_from_orientation_tag(orientation):
    """Guess upward vector in camera coordinates given the orientation tag.

    Assumes camera is looking towards the horizon and horizon is horizontal
    on the image when taking in to account the orientation tag.
    """
    # See http://sylvana.net/jpegcrop/exif_orientation.html
    if orientation == 1:
        return [0, -1, 0]
    if orientation == 2:
        return [0, -1, 0]
    if orientation == 3:
        return [0, 1, 0]
    if orientation == 4:
        return [0, 1, 0]
    if orientation == 5:
        return [-1, 0, 0]
    if orientation == 6:
        return [-1, 0, 0]
    if orientation == 7:
        return [1, 0, 0]
    if orientation == 8:
        return [1, 0, 0]
    logger.error("Unknown orientation tag: {}".format(orientation))
def guess_acceleration_from_orientation_tag ( orientation ) : # See http://sylvana.net/jpegcrop/exif_orientation.html if orientation == 1 : return [ 0 , - 1 , 0 ] if orientation == 2 : return [ 0 , - 1 , 0 ] if orientation == 3 : return [ 0 , 1 , 0 ] if orientation == 4 : return [ 0 , 1 , 0 ] if orientation == 5 : return [ - 1 , 0 , 0 ] if orientation == 6 : return [ - 1 , 0 , 0 ] if orientation == 7 : return [ 1 , 0 , 0 ] if orientation == 8 : return [ 1 , 0 , 0 ] logger . error ( "Unknown orientation tag: {}" . format ( orientation ) )