def save_inqscribe(filename, events): events.insert(0, (InqscribeEvent(self.frame2videoTime(0), 'Note:' + filename, None))) f = open(filename + ".inqscr", mode="w") f.write("app=InqScribe\n") event_str = "" for event in events: event_str += (str(event) + "\\r") f.write("text={}".format(event_str)) f.close()
def endIncident(self, end_time, white_avg_vel_out, black_avg_vel_out): self.end_time = end_time if(black_avg_vel_out < white_avg_vel_out): self.deinitiator = "Black" self.deinitiator_confidence = white_avg_vel_out - black_avg_vel_out else: self.deinitiator = "White" self.deinitiator_confidence = black_avg_vel_out - white_avg_vel_out self.duration = self.end_time - self.start_time self.inqscribe_events.append(InqscribeEvent(end_time, self.deinitiator[:1].lower(), 'ends'))
def __init__(self,start_time,white_avg_vel_in,black_avg_vel_in): self.start_time = start_time self.inqscribe_events = [] if(black_avg_vel_in > white_avg_vel_in): self.initiator = "Black" self.initiator_confidence = black_avg_vel_in - white_avg_vel_in else: self.initiator = "White" self.initiator_confidence = white_avg_vel_in - black_avg_vel_in self.deinitiator = None self.deinitiator_confidence = None self.inqscribe_events.append(InqscribeEvent(start_time, self.initiator[:1].lower(), 'prox'))
def __init__(self,start_time,beetleChar): self.start_time = start_time self.inqscribe_events = [] self.inqscribe_events.append(InqscribeEvent(start_time, beetleChar, 'first'))
def endIncident(self, end_time): self.end_time = end_time self.inqscribe_events.append(InqscribeEvent(end_time, self.beetleChar, 'fu.' + 'e'))
def __init__(self,start_time, beetleChar): self.beetleChar = beetleChar self.start_time = start_time self.inqscribe_events = [] self.inqscribe_events.append(InqscribeEvent(start_time, self.beetleChar, 'fu.' + 's'))
def __init__(self,start_time, end_time): self.start_time = start_time self.end_time = end_time self.inqscribe_events = [] self.inqscribe_events.append(InqscribeEvent(start_time, 't', 'start')) self.inqscribe_events.append(InqscribeEvent(end_time, 't', 'ends'))