Skip to content

Support Functions

Eric Swanson edited this page Nov 15, 2023 · 6 revisions

This module contains functions independent of any overarching class or specific workflow, which serve to assist the user in utilizing the core functions. supportfunctions.py contains supporting functions to format intrinsic files, convert extrinsic coordinates to and from geographical and local coordinate systems, calculate extrinsic values, and other steps necessary to utilize the core functions of the CoastalImageLib library. Additionally, supportfunctions.py contains functions that interface with Argus technology, including functions to create Argus compatible filenames from UTC timestamps, and convert raw Argus files into delivery files collected from the Argus tower Argus or other mini- Argus systems. Converting raw Argus data utilizes functions contained in argusIO.py.

Function definitions and examples

Functions are grouped by usage--transform functions, intrinsic function for loading and formatting, misc. functions--and listed in alphabetical order.

Transform functions

Intrinsic functions: loading and formatting

Misc. functions

avgColor

avgColor(img) source

Calculate the average pixel intensity of an image

Input:
    img (ndarray) - np.ndarray representing image
          img read as skimage.io.imread( 'imagefilename.jpg' )
Returns:
    av (ndarray) - av (np.array of average r, g, b values), 
    avall (float) - average of r,g,b

Example:

avgRGBArr, overallAvg = avgColor(img)
Clone this wiki locally