Package adams.data.opencv.transformer
Class ConvertType
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,ImageTransformer<OpenCVImageContainer>
,FlowContextHandler
,Serializable
,Comparable
public class ConvertType extends AbstractOpenCVTransformer
Converts the image according to the conversion code.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-conversion <COLOR_BGR2BGRA|COLOR_RGB2RGBA|COLOR_BGRA2BGR|COLOR_RGBA2RGB|COLOR_BGR2RGBA|COLOR_RGB2BGRA|COLOR_RGBA2BGR|COLOR_BGRA2RGB|COLOR_BGR2RGB|COLOR_RGB2BGR|COLOR_BGRA2RGBA|COLOR_RGBA2BGRA|COLOR_BGR2GRAY|COLOR_RGB2GRAY|COLOR_GRAY2BGR|COLOR_GRAY2RGB|COLOR_GRAY2BGRA|COLOR_GRAY2RGBA|COLOR_BGRA2GRAY|COLOR_RGBA2GRAY|COLOR_BGR2BGR565|COLOR_RGB2BGR565|COLOR_BGR5652BGR|COLOR_BGR5652RGB|COLOR_BGRA2BGR565|COLOR_RGBA2BGR565|COLOR_BGR5652BGRA|COLOR_BGR5652RGBA|COLOR_GRAY2BGR565|COLOR_BGR5652GRAY|COLOR_BGR2BGR555|COLOR_RGB2BGR555|COLOR_BGR5552BGR|COLOR_BGR5552RGB|COLOR_BGRA2BGR555|COLOR_RGBA2BGR555|COLOR_BGR5552BGRA|COLOR_BGR5552RGBA|COLOR_GRAY2BGR555|COLOR_BGR5552GRAY|COLOR_BGR2XYZ|COLOR_RGB2XYZ|COLOR_XYZ2BGR|COLOR_XYZ2RGB|COLOR_BGR2YCrCb|COLOR_RGB2YCrCb|COLOR_YCrCb2BGR|COLOR_YCrCb2RGB|COLOR_BGR2HSV|COLOR_RGB2HSV|COLOR_BGR2Lab|COLOR_RGB2Lab|COLOR_BGR2Luv|COLOR_RGB2Luv|COLOR_BGR2HLS|COLOR_RGB2HLS|COLOR_HSV2BGR|COLOR_HSV2RGB|COLOR_Lab2BGR|COLOR_Lab2RGB|COLOR_Luv2BGR|COLOR_Luv2RGB|COLOR_HLS2BGR|COLOR_HLS2RGB|COLOR_BGR2HSV_FULL|COLOR_RGB2HSV_FULL|COLOR_BGR2HLS_FULL|COLOR_RGB2HLS_FULL|COLOR_HSV2BGR_FULL|COLOR_HSV2RGB_FULL|COLOR_HLS2BGR_FULL|COLOR_HLS2RGB_FULL|COLOR_LBGR2Lab|COLOR_LRGB2Lab|COLOR_LBGR2Luv|COLOR_LRGB2Luv|COLOR_Lab2LBGR|COLOR_Lab2LRGB|COLOR_Luv2LBGR|COLOR_Luv2LRGB|COLOR_BGR2YUV|COLOR_RGB2YUV|COLOR_YUV2BGR|COLOR_YUV2RGB|COLOR_YUV2RGB_NV12|COLOR_YUV2BGR_NV12|COLOR_YUV2RGB_NV21|COLOR_YUV2BGR_NV21|COLOR_YUV420sp2RGB|COLOR_YUV420sp2BGR|COLOR_YUV2RGBA_NV12|COLOR_YUV2BGRA_NV12|COLOR_YUV2RGBA_NV21|COLOR_YUV2BGRA_NV21|COLOR_YUV420sp2RGBA|COLOR_YUV420sp2BGRA|COLOR_YUV2RGB_YV12|COLOR_YUV2BGR_YV12|COLOR_YUV2RGB_IYUV|COLOR_YUV2BGR_IYUV|COLOR_YUV2RGB_I420|COLOR_YUV2BGR_I420|COLOR_YUV420p2RGB|COLOR_YUV420p2BGR|COLOR_YUV2RGBA_YV12|COLOR_YUV2BGRA_YV12|COLOR_YUV2RGBA_IYUV|COLOR_YUV2BGRA_IYUV|COLOR_YUV2RGBA_I420|COLOR_YUV2BGRA_I420|COLOR_YUV420p2RGBA|COLOR_YUV420p2BGRA|COLOR_YUV2GRAY_420|COLOR_YUV2GRAY_NV21|COLOR_YUV2GRAY_NV12|COLOR_YUV2GRAY_YV12|COLOR_YUV2GRAY_IYUV|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RBG2BGR|COLOR_BayerBGGR2BGR|COLOR_BayerGBRG2BGR|COLOR_BayerRGGB2RGB|COLOR_BayerGRBG2RGB|COLOR_BayerBGGR2RGB|COLOR_BayerGBRG2RGB|COLOR_BayerBG2RGB|COLOR_BayerGB2RGB|COLOR_BayerRG2RGB|COLOR_BayerGR2RGB|COLOR_BayerBG2GRAY|COLOR_BayerGB2GRAY|COLOR_BayerRG2GRAY|COLOR_BayerGR2GRAY|COLOR_BayerRGGB2GRAY|COLOR_BayerGRBG2GRAY|COLOR_BayerBGGR2GRAY|COLOR_BayerGBRG2GRAY|COLOR_BayerBG2BGR_VNG|COLOR_BayerGB2BGR_VNG|COLOR_BayerRG2BGR_VNG|COLOR_BayerGR2BGR_VNG|COLOR_BayerRGGB2BGR_VNG|COLOR_BayerGRBG2BGR_VNG|COLOR_BayerBGGR2BGR_VNG|COLOR_BayerGBRG2BGR_VNG|COLOR_BayerRGGB2RGB_VNG|COLOR_BayerGRBG2RGB_VNG|COLOR_BayerBGGR2RGB_VNG|COLOR_BayerGBRG2RGB_VNG|COLOR_BayerBG2RGB_VNG|COLOR_BayerGB2RGB_VNG|COLOR_BayerRG2RGB_VNG|COLOR_BayerGR2RGB_VNG|COLOR_BayerBG2BGR_EA|COLOR_BayerGB2BGR_EA|COLOR_BayerRG2BGR_EA|COLOR_BayerGR2BGR_EA|COLOR_BayerRGGB2BGR_EA|COLOR_BayerGRBG2BGR_EA|COLOR_BayerBGGR2BGR_EA|COLOR_BayerGBRG2BGR_EA|COLOR_BayerRGGB2RGB_EA|COLOR_BayerGRBG2RGB_EA|COLOR_BayerBGGR2RGB_EA|COLOR_BayerGBRG2RGB_EA|COLOR_BayerBG2RGB_EA|COLOR_BayerGB2RGB_EA|COLOR_BayerRG2RGB_EA|COLOR_BayerGR2RGB_EA|COLOR_BayerBG2BGRA|COLOR_BayerGB2BGRA|COLOR_BayerRG2BGRA|COLOR_BayerGR2BGRA|COLOR_BayerRGGB2BGRA|COLOR_BayerGRBG2BGRA|COLOR_BayerBGGR2BGRA|COLOR_BayerGBRG2BGRA|COLOR_BayerRGGB2RGBA|COLOR_BayerGRBG2RGBA|COLOR_BayerBGGR2RGBA|COLOR_BayerGBRG2RGBA|COLOR_BayerBG2RGBA|COLOR_BayerGB2RGBA|COLOR_BayerRG2RGBA|COLOR_BayerGR2RGBA|COLOR_COLORCVT_MAX> (property: conversion) The color conversion to apply. default: COLOR_BGR2GRAY
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ColorConversionCode
m_Conversion
the conversion type.-
Fields inherited from class adams.data.image.AbstractImageTransformer
m_FlowContext
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description ConvertType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
conversionTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected OpenCVImageContainer[]
doTransform(OpenCVImageContainer img)
Performs no transformation at all, just returns the input.ColorConversionCode
getConversion()
Returns the conversion to apply.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.String
globalInfo()
Returns a string describing the object.void
setConversion(ColorConversionCode value)
Sets the conversion to apply.-
Methods inherited from class adams.data.opencv.transformer.AbstractOpenCVTransformer
forCommandLine, forName, getTransformations
-
Methods inherited from class adams.data.image.AbstractImageTransformer
checkImage, cleanUp, compareTo, destroy, equals, getFlowContext, initialize, setFlowContext, shallowCopy, shallowCopy, transform
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Conversion
protected ColorConversionCode m_Conversion
the conversion type.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setConversion
public void setConversion(ColorConversionCode value)
Sets the conversion to apply.- Parameters:
value
- the conversion
-
getConversion
public ColorConversionCode getConversion()
Returns the conversion to apply.- Returns:
- the conversion
-
conversionTipText
public String conversionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractImageTransformer<OpenCVImageContainer>
- Returns:
- null if no info available, otherwise short string
-
doTransform
protected OpenCVImageContainer[] doTransform(OpenCVImageContainer img)
Performs no transformation at all, just returns the input.- Specified by:
doTransform
in classAbstractImageTransformer<OpenCVImageContainer>
- Parameters:
img
- the image to process (can be modified, since it is a copy)- Returns:
- the copy of the image
-
-