ReferencePixels¶
Qualified name: CDC.color_models.ReferencePixels
- class ReferencePixels(*, reference, annotated)[source]¶
Bases:
objectA Class for handling the reference pixels for color models. Extracted from a reference image and an annotated mask.
- Parameters:
reference (pathlib.Path) – Reference image from which the pixels are extracted.
annotated (pathlib.Path) – Image with annotated pixels locations for extraction.
Methods
Generate Pixel values from reference and mask image.
Load image from file.
Attributes
The reference pixel values.
- generate_pixel_values(ref_image, mask_image, lower_range=(245, 0, 0), higher_range=(256, 10, 10))[source]¶
Generate Pixel values from reference and mask image. Lower_range and higher_range is only used if mask is annotated with a color to extract the pixel with a given color. Default red.