ColorToLightness
Extracts the lightness plane of an RGB image in the HSL space.
Access to parameter description
For an introduction to image filters: section Color Transforms.
ColorToLightness computes the lightness component of the HSL space and provides it as output image.
See also
Access to parameter description
For an introduction to image filters: section Color Transforms.
ColorToLightness computes the lightness component of the HSL space and provides it as output image.
See also
Function Syntax
This function returns outputGrayImage.
// Function prototype
std::shared_ptr< iolink::ImageView > colorToLightness( std::shared_ptr< iolink::ImageView > inputColorImage, std::shared_ptr< iolink::ImageView > outputGrayImage = NULL );
This function returns outputGrayImage.
// Function prototype. color_to_lightness( input_color_image, output_gray_image = None )
This function returns outputGrayImage.
// Function prototype. public static IOLink.ImageView ColorToLightness( IOLink.ImageView inputColorImage, IOLink.ImageView outputGrayImage = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputColorImage |
The color RGB input image. | Image | Multispectral | nullptr |
![]() |
outputGrayImage |
The lightness output image (grayscale). Its spatial dimensions and type are forced to the same values as the input. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
input_color_image |
The color RGB input image. | image | Multispectral | None |
![]() |
output_gray_image |
The lightness output image (grayscale). Its spatial dimensions and type are forced to the same values as the input. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputColorImage |
The color RGB input image. | Image | Multispectral | null |
![]() |
outputGrayImage |
The lightness output image (grayscale). Its spatial dimensions and type are forced to the same values as the input. | Image | null |
Object Examples
std::shared_ptr< iolink::ImageView > ateneub = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "ateneub.jpg" ); ColorToLightness colorToLightnessAlgo; colorToLightnessAlgo.setInputColorImage( ateneub ); colorToLightnessAlgo.execute(); std::cout << "outputGrayImage:" << colorToLightnessAlgo.outputGrayImage()->toString();
ateneub = ioformat.read_image(imagedev_data.get_image_path("ateneub.jpg")) color_to_lightness_algo = imagedev.ColorToLightness() color_to_lightness_algo.input_color_image = ateneub color_to_lightness_algo.execute() print( "output_gray_image:", str( color_to_lightness_algo.output_gray_image ) )
ImageView ateneub = ViewIO.ReadImage( @"Data/images/ateneub.jpg" ); ColorToLightness colorToLightnessAlgo = new ColorToLightness { inputColorImage = ateneub }; colorToLightnessAlgo.Execute(); Console.WriteLine( "outputGrayImage:" + colorToLightnessAlgo.outputGrayImage.ToString() );
Function Examples
std::shared_ptr< iolink::ImageView > ateneub = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "ateneub.jpg" ); auto result = colorToLightness( ateneub ); std::cout << "outputGrayImage:" << result->toString();
ateneub = ioformat.read_image(imagedev_data.get_image_path("ateneub.jpg")) result = imagedev.color_to_lightness( ateneub ) print( "output_gray_image:", str( result ) )
ImageView ateneub = ViewIO.ReadImage( @"Data/images/ateneub.jpg" ); IOLink.ImageView result = Processing.ColorToLightness( ateneub ); Console.WriteLine( "outputGrayImage:" + result.ToString() );