An auxiliary class that defines how images are to be transformed. More...
Public Member Functions | |
def | change_colors (self, from_colors, to_color) |
This method prepares the transformation of the color list to a specific color. More... | |
def | colors_inversion (self) |
This method prepares the transformation of colors to their inverse value. More... | |
def | threshold (self, threshold) |
The method prepares for bitmap transformation to a bitmap (black and white only). More... | |
An auxiliary class that defines how images are to be transformed.
def urpa.TransformationFactory.change_colors | ( | self, | |
from_colors, | |||
to_color | |||
) |
This method prepares the transformation of the color list to a specific color.
from_colors | a color list where the components are a tuple, the elements of which comprise three integers with a value from 0 to 255, for example [(255, 255, 255), (128, 128, 128)] |
to_color | a tuple, the elements of which comprise three integers with a value from 0 to 255, for example (0, 0, 0) |
Examples
def urpa.TransformationFactory.colors_inversion | ( | self | ) |
This method prepares the transformation of colors to their inverse value.
Examples
def urpa.TransformationFactory.threshold | ( | self, | |
threshold | |||
) |
The method prepares for bitmap transformation to a bitmap (black and white only).
threshold | float, e.g. 0.5 A value from 0 to 1, indicating at what ratio the range between 0 and 255 is to be divided into two groups. |
Examples