hypso.classification.WaterDetection.waterdetect.Glint module

class hypso.classification.WaterDetection.waterdetect.Glint.DWGlintProcessor(image, limit_angle=30)

Bases: object

classmethod create(image, limit_angle=30)
static create_annotated_heatmap(hm, img=None, cmap='magma', vmin=0.7, vmax=0.9)

Create an annotated heatmap. Parameter img is an optional background img to be blended

static create_glint_array(xml_file, product)
static create_glint_heatmap(rgb, glint_arr, limit_angle)
create_multiplication_coefs(min_glint_multiplier=0.5)
static get_grid_values_from_xml(tree_node, xpath_str)

Receives a XML tree node and a XPath parsing string and search for children matching the string. Then, extract the VALUES in <values> v1 v2 v3 </values> <values> v4 v5 v6 </values> format as numpy array Loop through the arrays to compute the mean.

glint_adjusted_threshold(band, value, thresh_type, mask=None, min_glint_multiplier=0.5)

Create an array with the image resolution, with the threshold adjusted for the GLINT thresh_type can be SUP or INF

static nn_interpolate(arr, new_size)

Vectorized Nearest Neighbor Interpolation From post: https://gist.github.com/KeremTurgutlu/68feb119c9dd148285be2e247267a203

save_heatmap(folder, filename='glint_heatmap.pdf', dpi=50, brightness=5.0)
show_multiplication_coefs()
supported_products = ['S2_S2COR', 'S2_THEIA', 'S2_PLANETARY']