def single_scan_for_max_temperature(self): lepton_interface = Lepton_interface() # time.sleep(0.2) raw_values = lepton_interface.get_raw_values() # Get camera output (raw values) max_temperature_old = self.get_max_temperature_data(raw_values) # Get the maximum temperature from raw values return max_temperature_old # Return the max temperature
def iterate_for_max_temperature(self): lepton_interface = Lepton_interface() ITERATIONS = 5 # How many times to take image max_temperature_old = { "max_raw_pixel": 0, "max_pixel_locations_x": 0, "max_pixel_locations_y": 0, "max_temperature": 0, "raw_values": 0, "min_temperature": 0 } # Initialize variable for i in range(0, ITERATIONS - 1): # Repeat as required by Iterations time.sleep(0.2) raw_values = lepton_interface.get_raw_values( ) # Get camera output (raw values) max_temperature_new = self.get_max_temperature_data( raw_values) # Get the maximum temperature from raw values if max_temperature_new["max_temperature"] > max_temperature_old[ "max_temperature"]: max_temperature_old = max_temperature_new # If new temp is max, record new max temperature else: continue # Else keep the old max temperature and continue return max_temperature_old # Return the max temperature
def single_scan_for_max_temperature(self): lepton_interface = Lepton_interface() # time.sleep(0.2) raw_values = lepton_interface.get_raw_values( ) # Get camera output (raw values) max_temperature_old = self.get_max_temperature_data( raw_values) # Get the maximum temperature from raw values return max_temperature_old # Return the max temperature
def iterate_for_max_temperature(self): lepton_interface = Lepton_interface() ITERATIONS = 5 # How many times to take image max_temperature_old = {"max_raw_pixel": 0, "max_pixel_locations_x": 0, "max_pixel_locations_y": 0, "max_temperature": 0, "raw_values": 0, "min_temperature": 0} # Initialize variable for i in range(0, ITERATIONS-1): # Repeat as required by Iterations time.sleep(0.2) raw_values = lepton_interface.get_raw_values() # Get camera output (raw values) max_temperature_new = self.get_max_temperature_data(raw_values) # Get the maximum temperature from raw values if max_temperature_new["max_temperature"] > max_temperature_old["max_temperature"]: max_temperature_old = max_temperature_new # If new temp is max, record new max temperature else: continue # Else keep the old max temperature and continue return max_temperature_old # Return the max temperature