darsia.detect_color#
- detect_color(img, color, tolerance=0.01)[source]#
Detects a color in an image.
- Parameters:
- img
darsia.OpticalImage The image to detect the color in. Assumed to be in RGB format. With values in the range [0, 1].
- color
Union[list[float],np.ndarray] The color to detect, assumed to be in RGB format. With values in the range [0, 1].
- tolerance
float,optional The tolerance for the color detection. Defaults to 0.1.
- img
- Returns:
darsia.VoxelArrayPixels with the detected color.