arcjetCV.utils.utils module

arcjetCV.utils.utils.annotateImage(orig, flags, top=True, left=True)[source]

Annotates the original image with flags indicating overexposure and underexposure.

Parameters:
  • orig – original image

  • flags – dictionary of flags indicating overexposure and underexposure

  • top – boolean, whether to annotate on the top of the image

  • left – boolean, whether to annotate on the left side of the image

arcjetCV.utils.utils.annotate_image_with_frame_number(image, frame_number)[source]

Annotates the given image with the frame number.

Parameters:
  • image – image to annotate

  • frame_number – frame number to annotate

arcjetCV.utils.utils.clahe_normalize(bgr)[source]

Applies Contrast Limited Adaptive Histogram Equalization (CLAHE) normalization to the given BGR image.

Parameters:

bgr – BGR image

Returns:

normalized BGR image

arcjetCV.utils.utils.getOutlierMask(metrics)[source]

Computes the outlier mask using Local Outlier Factor (LOF).

Parameters:

metrics – metrics data

Returns:

outlier mask

arcjetCV.utils.utils.smooth(x, window_len=11, window='hanning')[source]

Smooths the data using a window with the requested size.

Parameters:
  • x – the input signal

  • window_len – the dimension of the smoothing window; should be an odd integer

  • window – the type of window from ‘flat’, ‘hanning’, ‘hamming’, ‘bartlett’, ‘blackman’ flat window will produce a moving average smoothing.

Returns:

the smoothed signal

Example: `python t = np.linspace(-2, 2, 0.1) x = np.sin(t) + np.random.randn(len(t)) * 0.1 y = smooth(x) `

arcjetCV.utils.utils.splitfn(fn: str)[source]

Splits the given file path into directory, file name, and extension.

Parameters:

fn – file path

Returns:

directory path, file name, extension