digital_image_processing.morphological_operations.dilation_operation

Attributes

lena_path

Functions

dilation(→ numpy.ndarray)

Return dilated image

gray_to_binary(→ numpy.ndarray)

Return binary image from gray image

rgb_to_gray(→ numpy.ndarray)

Return gray image from rgb image

Module Contents

digital_image_processing.morphological_operations.dilation_operation.dilation(image: numpy.ndarray, kernel: numpy.ndarray) numpy.ndarray

Return dilated image >>> dilation(np.array([[True, False, True]]), np.array([[0, 1, 0]])) array([[False, False, False]]) >>> dilation(np.array([[False, False, True]]), np.array([[1, 0, 1]])) array([[False, False, False]])

digital_image_processing.morphological_operations.dilation_operation.gray_to_binary(gray: numpy.ndarray) numpy.ndarray

Return binary image from gray image >>> gray_to_binary(np.array([[127, 255, 0]])) array([[False, True, False]]) >>> gray_to_binary(np.array([[0]])) array([[False]]) >>> gray_to_binary(np.array([[26.2409, 4.9315, 1.4729]])) array([[False, False, False]]) >>> gray_to_binary(np.array([[26, 255, 14], [5, 147, 20], [1, 200, 0]])) array([[False, True, False],

[False, True, False], [False, True, False]])

digital_image_processing.morphological_operations.dilation_operation.rgb_to_gray(rgb: numpy.ndarray) numpy.ndarray

Return gray image from rgb image >>> rgb_to_gray(np.array([[[127, 255, 0]]])) array([[187.6453]]) >>> rgb_to_gray(np.array([[[0, 0, 0]]])) array([[0.]]) >>> rgb_to_gray(np.array([[[2, 4, 1]]])) array([[3.0598]]) >>> rgb_to_gray(np.array([[[26, 255, 14], [5, 147, 20], [1, 200, 0]]])) array([[159.0524, 90.0635, 117.6989]])

digital_image_processing.morphological_operations.dilation_operation.lena_path