Ejemplo n.º 1
0
def main():
    print("ALP test")
    # This segment of code tests generating an Instruction with a single frame
    scalp_frame = fr.Frame()
    single_contour = scalp_frame.get_contour_of_image(
        image_path="./whitestar.jpg")
    scalp_instruction = ins.Instruction()
    scalp_instruction = scalp_frame.get_instruction_from_contour(
        contour=single_contour)
    scalp_instruction.plot_instruction()
    # This segment of code tests an Instruction with multiple frames
    file_dir = "./current_video_frame_threshs/"
    if [f for f in os.listdir(file_dir) if not f.startswith('.')] == []:
        print("empty dir")
        get_frames_diff_from_video()
    else:
        print("not empty")
    # instruction_set = get_contour_instructions_per_frame()
    scalp_instruction_set = ins.Instruction()
    scalp_instruction_set.get_instruction_series_from_video_frames(
        directory=file_dir)
    print(scalp_instruction_set.instruction_series[1])
    # scalp_instruction_set.instruction_series = instruction_set
    # scalp_instruction_set.get_instruction_size()
    # scalp_instruction_set.plot_instruction_series()
    A = scalp_instruction_set.instruction_series
    scalp_display = disp.Display()
    scalp_display.display_series_of_instructions(instruct_series=A,
                                                 display_time=1)
Ejemplo n.º 2
0
 def __init__(self):
     self.ownShip = Aircraft(0, 0, 0, 0, 0, 0, 0, 0)
     self.aircraftQueue = PriorityQueue()
     self.myAction = Action(0, 0)
     self.ads_bInt = ADS_BDriver()
     self.display = Display()
     self.loudSpeaker = LoudSpeaker()
     self.panelBtns = FrontPanelButtons()