Package com.itextpdf.pdfocr.onnx
Enum ImageChannelConfiguration
- All Implemented Interfaces:
-
Serializable,Comparable<ImageChannelConfiguration>,java.lang.constant.Constable
Enumeration of supported image channel configuration for buffers. These are used, when we need to provide an input to an ML model from an image.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index of the blue channel in the resulting ML input buffer.intReturns the amount of channels used to store the image.intReturns the index of the green channel in the resulting ML input buffer.intReturns the index of the red channel in the resulting ML input buffer.static ImageChannelConfigurationReturns the enum constant of this type with the specified name.static ImageChannelConfiguration[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
GRAYSCALE
Image is represented with a single channel, which contains the grayscale version of the image. -
RGB
Image is represented with three channels: red, green, blue. -
BGR
Image is represented with three channels: blue, green, red.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
-
name- the name of the enum constant to be returned. - Returns:
- the enum constant with the specified name
- Throws:
-
IllegalArgumentException- if this enum type has no constant with the specified name -
NullPointerException- if the argument is null
-
getChannelCount
public int getChannelCount()Returns the amount of channels used to store the image.- Returns:
- the amount of channels used to store the image
-
getRedChannelIndex
public int getRedChannelIndex()Returns the index of the red channel in the resulting ML input buffer.- Returns:
- the index of the red channel in the resulting ML input buffer
-
getGreenChannelIndex
public int getGreenChannelIndex()Returns the index of the green channel in the resulting ML input buffer.- Returns:
- the index of the green channel in the resulting ML input buffer
-
getBlueChannelIndex
public int getBlueChannelIndex()Returns the index of the blue channel in the resulting ML input buffer.- Returns:
- the index of the blue channel in the resulting ML input buffer
-