def mod_ndwi_learned(domain, b): if domain.unflooded_domain == None: print "No unflooded training domain provided." return None unflooded_b = modis_utilities.compute_modis_indices(domain.unflooded_domain) water_mask = modis_utilities.get_permanent_water_mask() threshold = modis_utilities.compute_binary_threshold(get_mod_ndwi(unflooded_b), water_mask, domain.bounds) return mod_ndwi(domain, b, threshold)
def mod_ndwi_learned(domain, b): if domain.unflooded_domain == None: print 'No unflooded training domain provided.' return None unflooded_b = modis_utilities.compute_modis_indices(domain.unflooded_domain) water_mask = modis_utilities.get_permanent_water_mask() threshold = modis_utilities.compute_binary_threshold(get_mod_ndwi(unflooded_b), water_mask, domain.bounds) return mod_ndwi(domain, b, threshold)
def dart_learned(domain, b): """The dartmouth method but with threshold calculation included (training image required)""" if domain.unflooded_domain == None: print "No unflooded training domain provided." return None unflooded_b = modis_utilities.compute_modis_indices(domain.unflooded_domain) water_mask = modis_utilities.get_permanent_water_mask() threshold = modis_utilities.compute_binary_threshold(get_dartmouth(unflooded_b), water_mask, domain.bounds) return dartmouth(domain, b, threshold)
def dart_learned(domain, b): '''The dartmouth method but with threshold calculation included (training image required)''' if domain.unflooded_domain == None: print 'No unflooded training domain provided.' return None unflooded_b = modis_utilities.compute_modis_indices(domain.unflooded_domain) water_mask = modis_utilities.get_permanent_water_mask() threshold = modis_utilities.compute_binary_threshold(get_dartmouth(unflooded_b), water_mask, domain.bounds) return dartmouth(domain, b, threshold)
def diff_learned(domain, b): '''modis_diff but with the threshold calculation included (training image required)''' if domain.unflooded_domain == None: print 'No unflooded training domain provided.' return None unflooded_b = modis_utilities.compute_modis_indices(domain.unflooded_domain) water_mask = modis_utilities.get_permanent_water_mask() threshold = modis_utilities.compute_binary_threshold(get_diff(unflooded_b), water_mask, domain.bounds) return modis_diff(domain, b, threshold)