asi_core.calibration.mask_creation

A small tool to create ASI masks manually.

Attributes

parser

Classes

ObstacleMaskDetection

Handles the manual creation of an ASI mask to obscure obstacles in the ASI's field of view

Functions

adjust_gamma(image[, gamma])

Only for improved visibility, for radiometric evaluations reconsider

Module Contents

asi_core.calibration.mask_creation.adjust_gamma(image, gamma=1.0)

Only for improved visibility, for radiometric evaluations reconsider

Taken from https://pyimagesearch.com/2015/10/05/opencv-gamma-correction/

Build a lookup table mapping the pixel values [0, 255] to their adjusted gamma values and apply it.

Parameters:
  • image – Input RGB image

  • gamma – Gamma scalar parameter

Returns:

Gamma-corrected image

class asi_core.calibration.mask_creation.ObstacleMaskDetection

Handles the manual creation of an ASI mask to obscure obstacles in the ASI’s field of view

max_intensity
params_cv_detection
image_pxl_size
image_path
save_name
orig_img
mask
gui_add_to_mask = [[]]
gui_remove_from_mask = [[]]
gui_previous_event = None
detect_mask_cv(params=None)

Applies computer vision methods to automatically detect a mask of obstacles obscuring the sky in the ASI image.

Parameters:

params – Configuration parameters to the algorithm

Returns:

automatically detected mask, dtype boolean, shape of greyscaled RGB input image

click_and_crop(event, x, y, f, cb)

From user clicks polygons are created indicating image areas to be masked or not.

apply_polygons()

Area inside polygon specified by the user is added to or removed from the mask.

refine_manually()

Lets user specify image regions to be added or removed from mask.

apply_mask()

Applies mask to image used for mask creation

save_mask_and_docu()

Saves the mask in legacy format and docu information

The following is saved: - A mat file which contains the mask and the path to the image based on which it was created - A jpg image file visualizing the masked areas in the original image

asi_core.calibration.mask_creation.parser