Common Vision Blox Spectral module for Python. More...
Classes | |
| class | Cube |
| Spectral Cube object. More... | |
| class | CubeEncoding |
| Defines how the mapping between a typical x-y image and samples-lines-bands is done. More... | |
| class | CubeRange |
| 3D rectangle in the samples, lines and bands domain. More... | |
| class | CubeType |
| Defines the type of the cube. More... | |
| class | FieldID |
| Defines the field IDs to access fields in the metadata object. More... | |
| class | FieldType |
| Data type of a field. More... | |
| class | InterpolationMethod |
| Defines the interpolation method. More... | |
| class | Interpolator |
| Spectral Interpolator object. More... | |
| class | MetaData |
| Spectral MetaData object. More... | |
| class | NormalizationMethod |
| Defines the method used for normalizing the spectral cube with a white and a black reference. More... | |
| class | PixelOverflow |
| Defines how arithmetic overflows and underflows are handled. More... | |
| class | StdIlluminant |
| Defines Standard Illumination. More... | |
| class | StdObserver |
| Defines Standard Observer. More... | |
| class | WrappedCube |
| A wrapped cube (or linear non-owning cube) wraps another pixel buffer without owning it. More... | |
Functions | |
| cvb.spectral.Cube | add_cube (cvb.spectral.Cube cube1, cvb.spectral.Cube cube2, Optional[int] pixel_overflow) |
| Element-wise addition of two cubes. More... | |
| cvb.Image | convert_cube_to_lab (cvb.spectral.Cube cube, cvb.spectral.Interpolator interpolator) |
| Converts the cube to a Lab image. More... | |
| cvb.Image | convert_cube_to_xyz (cvb.spectral.Cube cube, cvb.spectral.Interpolator interpolator) |
| Converts the cube to an XYZ image. More... | |
| cvb.Image | convert_lab_to_rgb8 (cvb.Image lab_image, cvb.spectral.Interpolator interpolator) |
| Converts a Lab image to a sRGB 8bit image. More... | |
| cvb.Image | convert_xyz_to_lab (cvb.Image xyz_image, cvb.spectral.Interpolator interpolator) |
| Converts an image from XYZ to Lab. More... | |
| cvb.spectral.Cube | divide_cube (cvb.spectral.Cube dividend, cvb.spectral.Cube divisor) |
| Element-wise division of two cubes. More... | |
| cvb.spectral.Cube | multiply_cube (cvb.spectral.Cube cube1, cvb.spectral.Cube cube2, Optional[int] pixel_overflow) |
| Element-wise multiplication of two cubes. More... | |
| cvb.spectral.Cube | normalize (cvb.spectral.Cube cube, cvb.spectral.Cube white_reference, cvb.spectral.Cube black_reference, int normalization_method) |
| This function creates a normalized cube using the white- and black-reference and the object cube. More... | |
| cvb.spectral.Cube | subtract_cube (cvb.spectral.Cube minuend, cvb.spectral.Cube subtrahend, Optional[int] pixel_overflow) |
| Element-wise subtraction of two cubes. More... | |
| cvb.spectral.Cube add_cube | ( | cvb.spectral.Cube | cube1, |
| cvb.spectral.Cube | cube2, | ||
| Optional[int] | pixel_overflow | ||
| ) |
Element-wise addition of two cubes.
Creates a new cube after adding all values of cube1 and cube2 for each element (cube1 + cube2).
cube1 : cvb.spectral.Cube Any kind of cube is supported as long as the dimensions match with cube2.
cube2 : cvb.spectral.Cube Any kind of cube is supported as long as the dimensions match with cube1.
pixel_overflow : Optional[int] In case of cvb.spectral.PixelOverflow.Truncate: Clips the resulting pixel values to the maximum / minimum possible value of the resulting data type. In case of cvb.spectral.PixelOverflow.Unhandled (default): The result might lead to overflow (see cvb.spectral.PixelOverflow).
cvb.spectral.Cube Linear cube of the same dimensions and data type. The metadata is a copy from cube.
| cvb.Image convert_cube_to_lab | ( | cvb.spectral.Cube | cube, |
| cvb.spectral.Interpolator | interpolator | ||
| ) |
Converts the cube to a Lab image.
cube : cvb.spectral.Cube Linear cube with matching number of bands with the ones in the interpolator.
interpolator : cvb.spectral.Interpolator Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant.
cvb.Image 3-planed float32 image containing the values of Lab (L-value in plane=0, a-value in plane=1, b-value in plane=2).
| cvb.Image convert_cube_to_xyz | ( | cvb.spectral.Cube | cube, |
| cvb.spectral.Interpolator | interpolator | ||
| ) |
Converts the cube to an XYZ image.
cube : cvb.spectral.Cube Linear cube with matching number of bands with the ones in the interpolator.
interpolator : cvb.spectral.Interpolator Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant.
cvb.Image 3-planed float32 image containing the values of XYZ (X-value in plane=0, Y-value in plane=1, Z-value in plane=2).
| cvb.Image convert_lab_to_rgb8 | ( | cvb.Image | lab_image, |
| cvb.spectral.Interpolator | interpolator | ||
| ) |
Converts a Lab image to a sRGB 8bit image.
lab_image : cvb.Image 3-planed image of data type float / double containing the Lab-values.
interpolator : cvb.spectral.Interpolator Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant.
cvb.Image 3-planed uint8 image containing the values of sRGB (R-value in plane=0, G-value in plane=1, B-value in plane=2).
| cvb.Image convert_xyz_to_lab | ( | cvb.Image | xyz_image, |
| cvb.spectral.Interpolator | interpolator | ||
| ) |
Converts an image from XYZ to Lab.
xyz_image : cvb.Image 3-planed image of data type float / double containing the XYZ-values.
interpolator : cvb.spectral.Interpolator Contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant.
cvb.Image 3-planed float32 image containing the values of Lab (L-value in plane=0, a-value in plane=1, b-value in plane=2).
| cvb.spectral.Cube divide_cube | ( | cvb.spectral.Cube | dividend, |
| cvb.spectral.Cube | divisor | ||
| ) |
Element-wise division of two cubes.
Creates a new cube after dividing all values of dividend and divisor for each element (dividend / divisor).
dividend : cvb.spectral.Cube Any kind of cube is supported as long as the dimensions match with divisor.
divisor : cvb.spectral.Cube Any kind of cube is supported as long as the dimensions match with dividend.
cvb.spectral.Cube Linear cube of the same dimensions and data type. The metadata is a copy from dividend.
| cvb.spectral.Cube multiply_cube | ( | cvb.spectral.Cube | cube1, |
| cvb.spectral.Cube | cube2, | ||
| Optional[int] | pixel_overflow | ||
| ) |
Element-wise multiplication of two cubes.
Creates a new cube after multiplying all values of cube1 and cube2 for each element (cube1 * cube2).
cube1 : cvb.spectral.Cube Any kind of cube is supported as long as the dimensions match with cube2.
cube2 : cvb.spectral.Cube Any kind of cube is supported as long as the dimensions match with cube1.
pixel_overflow : Optional[int] In case of cvb.spectral.PixelOverflow.Truncate: Clips the resulting pixel values to the maximum/minimum possible value of the resulting data type. In case of cvb.spectral.PixelOverflow.Unhandled (default): The result might lead to overflow (see cvb.spectral.PixelOverflow).
cvb.spectral.Cube Linear cube of the same dimensions and data type. The metadata is a copy from cube.
| cvb.spectral.Cube normalize | ( | cvb.spectral.Cube | cube, |
| cvb.spectral.Cube | white_reference, | ||
| cvb.spectral.Cube | black_reference, | ||
| int | normalization_method | ||
| ) |
This function creates a normalized cube using the white- and black-reference and the object cube.
More details in cvb.spectral.NormalizationMethod.
cube : cvb.spectral.Cube Spectral Cube to work on.
white_reference : cvb.spectral.Cube The white reference contains a linear Cube with matching dimensions for samples and bands to cube.
black_reference : cvb.spectral.Cube The black reference contains a linear Cube with matching dimensions for samples and bands to cube.
normalization_method : int Defines the normalization method. More detailed information in cvb.spectral.NormalizationMethod (see cvb.spectral.NormalizationMethod); default: cvb.spectral.NormalizationMethod.AverageReferences1.
cvb.spectral.Cube Linear cube of the same dimensions and data type. The metadata is a copy from cube.
| cvb.spectral.Cube subtract_cube | ( | cvb.spectral.Cube | minuend, |
| cvb.spectral.Cube | subtrahend, | ||
| Optional[int] | pixel_overflow | ||
| ) |
Element-wise subtraction of two cubes.
Creates a new cube after subtracting all values of minuend and subtrahend for each element (minuend - subtrahend).
minuend : cvb.spectral.Cube Any kind of cube is supported as long as the dimensions match with subtrahend.
subtrahend : cvb.spectral.Cube Any kind of cube is supported as long as the dimensions match with minuend.
pixel_overflow : Optional[int] In case of cvb.spectral.PixelOverflow.Truncate: Clips the resulting pixel values to the maximum/minimum possible value of the resulting data type. In case of cvb.spectral.PixelOverflow.Unhandled (default): The result might lead to overflow (see cvb.spectral.PixelOverflow).
cvb.spectral.Cube Linear cube of the same dimensions and data type. The metadata is a copy from minuend.