from microprograms.errors.angles_micro_programs import applyPositionTightnessError from models.pose_estimator.pose_estimator_model_setup import get_pose_estimation from microprograms.errors.distance_from_springboard_micro_program import board_end from microprograms.errors.distance_from_springboard_micro_program import find_which_side_board_on from models.detectron2.platform_detector_setup import get_platform_detector import numpy as np import cv2 def takeoff_microprogram_one_frame(filepath, above_board, on_board, pose_pred=None): if not above_board: return 0 if on_board: return 1 return 0 # angle = applyPositionTightnessError(filepath, pose_pred) # if angle is None: # return 0 # if angle > 90: # return 1 # else: # return 0