preprocess_image#

ripplemapper.image.preprocess_image(image: ndarray, roi_x: list[int] = False, roi_y: list[int] = False, sigma: float = 1) ndarray[source]#

Preprocess the image by converting it to grayscale and applying Gaussian blur.

Parameters:
  • image (np.ndarray) – Input image.

  • roi_x (list[int], optional) – Region of interest in the x-dimension, by default False.

  • roi_y (list[int], optional) – Region of interest in the y-dimension, by default False.

  • sigma (float, optional) – Sigma value for Gaussian blur, by default 1.

Returns:

Preprocessed image.

Return type:

np.ndarray