FOD

Python class used for the Foreign Object Debris detection.

Python

class src.processing_cores.fod.FOD

Class for the FOD detection

add_reference(name, reference_image)

Adds the image as reference with its name.

Arguments:

name (str): Name of the reference image reference_image (Image): Reference image used for the FOD detection

detect_FOD(name, image)

Computes the FOD detection on the given image and with the reference chosen by the name.

Arguments:

name (str): Name of the reference image image (Image): Image on which the detection is performed

Returns:

bool: Presence or not of FODs numpy.ndarray: Image with detected FODs

display(contours, frame, th_map_close)

Draws contours on the frame and display it.

Arguments:

contours (list): List of list of coordinates frame (Image): Source image th_map_close (Image): Thresholded image

frame_with_fod(contours, image)

Draws contours on the frame and display it.

Arguments:

contours (list): List of list of coordinates image (Image): Source image

Returns:

Image: Image with FODs contour drawn

get_size()

Returns the square window size for the detection.

Returns:

int: Square Window size

get_step()

Returns the step.

Returns:

int: Step between two windows

normalized_H_channel(image)

Normalizes and converts the image to HSV. Return the channel H.

Arguments:

image (Image): Source image

Returns:

numpy.ndarray: Normalized H channel

normalized_histogram(image)

Process the histogram from the given image and normalizes it between 0 and 1.

Arguments:

image (Image): Source image

Returns:

numpy.ndarray: Normalized histogram