public static class opencv_contrib.Retina extends Pointer
| Modifier and Type | Class and Description |
|---|---|
static class |
opencv_contrib.Retina.RetinaParameters |
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
opencv_contrib.Retina() |
opencv_contrib.Retina(opencv_core.Size inputSize)
Main constructor with most commun use setup : create an instance of color ready retina model
|
opencv_contrib.Retina(opencv_core.Size inputSize,
boolean colorMode) |
opencv_contrib.Retina(opencv_core.Size inputSize,
boolean colorMode,
int colorSamplingMethod,
boolean useRetinaLogSampling,
double reductionFactor,
double samplingStrenght)
Complete Retina filter constructor which allows all basic structural parameters definition
|
opencv_contrib.Retina(Pointer p) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateContoursProcessing(boolean activate)
Activate/desactivate the Parvocellular pathway processing (contours information extraction), by default, it is activated
|
void |
activateMovingContoursProcessing(boolean activate)
Activate/desactivate the Magnocellular pathway processing (motion information extraction), by default, it is activated
|
void |
clearBuffers()
clear all retina buffers (equivalent to opening the eyes after a long period of eye close ;o)
|
opencv_contrib.FloatValArray |
getMagno() |
void |
getMagno(opencv_contrib.FloatValArray retinaOutput_magno)
accessor of the motion channel of the retina (models peripheral vision)
|
void |
getMagno(opencv_core.Mat retinaOutput_magno)
accessor of the motion channel of the retina (models peripheral vision)
|
opencv_contrib.Retina.RetinaParameters |
getParameters() |
opencv_contrib.FloatValArray |
getParvo() |
void |
getParvo(opencv_contrib.FloatValArray retinaOutput_parvo)
accessor of the details channel of the retina (models foveal vision)
|
void |
getParvo(opencv_core.Mat retinaOutput_parvo)
accessor of the details channel of the retina (models foveal vision)
|
opencv_core.Size |
inputSize()
retreive retina input buffer size
|
opencv_core.Size |
outputSize()
retreive retina output buffer size
|
BytePointer |
printSetup()
parameters setup display method
|
void |
run(opencv_core.Mat inputImage)
method which allows retina to be applied on an input image, after run, encapsulated retina module is ready to deliver its outputs using dedicated acccessors, see getParvo and getMagno methods
|
void |
setColorSaturation() |
void |
setColorSaturation(boolean saturateColors,
float colorSaturationValue)
activate color saturation as the final step of the color demultiplexing process
-> this saturation is a sigmoide function applied to each channel of the demultiplexed image.
|
void |
setup() |
void |
setup(BytePointer retinaParameterFile,
boolean applyDefaultSetupOnFailure)
try to open an XML retina parameters file to adjust current retina instance setup
=> if the xml file does not exist, then default setup is applied
=> warning, Exceptions are thrown if read XML file is not valid
|
void |
setup(opencv_contrib.Retina.RetinaParameters newParameters)
try to open an XML retina parameters file to adjust current retina instance setup
=> if the xml file does not exist, then default setup is applied
=> warning, Exceptions are thrown if read XML file is not valid
|
void |
setup(opencv_core.FileStorage fs) |
void |
setup(opencv_core.FileStorage fs,
boolean applyDefaultSetupOnFailure)
try to open an XML retina parameters file to adjust current retina instance setup
=> if the xml file does not exist, then default setup is applied
=> warning, Exceptions are thrown if read XML file is not valid
|
void |
setup(String retinaParameterFile,
boolean applyDefaultSetupOnFailure) |
void |
setupIPLMagnoChannel() |
void |
setupIPLMagnoChannel(boolean normaliseOutput,
float parasolCells_beta,
float parasolCells_tau,
float parasolCells_k,
float amacrinCellsTemporalCutFrequency,
float V0CompressionParameter,
float localAdaptintegration_tau,
float localAdaptintegration_k)
set parameters values for the Inner Plexiform Layer (IPL) magnocellular channel
this channel processes signals outpint from OPL processing stage in peripheral vision, it allows motion information enhancement.
|
void |
setupOPLandIPLParvoChannel() |
void |
setupOPLandIPLParvoChannel(boolean colorMode,
boolean normaliseOutput,
float photoreceptorsLocalAdaptationSensitivity,
float photoreceptorsTemporalConstant,
float photoreceptorsSpatialConstant,
float horizontalCellsGain,
float HcellsTemporalConstant,
float HcellsSpatialConstant,
float ganglionCellsSensitivity)
setup the OPL and IPL parvo channels (see biologocal model)
OPL is referred as Outer Plexiform Layer of the retina, it allows the spatio-temporal filtering which withens the spectrum and reduces spatio-temporal noise while attenuating global luminance (low frequency energy)
IPL parvo is the OPL next processing stage, it refers to Inner Plexiform layer of the retina, it allows high contours sensitivity in foveal vision.
|
void |
write(BytePointer fs)
write xml/yml formated parameters information
|
void |
write(opencv_core.FileStorage fs)
write xml/yml formated parameters information
|
void |
write(String fs) |
address, asBuffer, asByteBuffer, capacity, capacity, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, hashCode, isNull, limit, limit, memchr, memcmp, memcpy, memmove, memset, offsetof, position, position, put, setNull, sizeof, toString, withDeallocator, zeropublic opencv_contrib.Retina()
public opencv_contrib.Retina(Pointer p)
public opencv_contrib.Retina(opencv_core.Size inputSize)
inputSize - : the input frame sizepublic opencv_contrib.Retina(opencv_core.Size inputSize, boolean colorMode, int colorSamplingMethod, boolean useRetinaLogSampling, double reductionFactor, double samplingStrenght)
inputSize - : the input frame sizecolorMode - : the chosen processing mode : with or without color processingcolorSamplingMethod: - specifies which kind of color sampling will be useduseRetinaLogSampling: - activate retina log sampling, if true, the 2 following parameters can be usedreductionFactor: - only usefull if param useRetinaLogSampling=true, specifies the reduction factor of the output frame (as the center (fovea) is high resolution and corners can be underscaled, then a reduction of the output is allowed without precision leaksamplingStrenght: - only usefull if param useRetinaLogSampling=true, specifies the strenght of the log scale that is appliedpublic opencv_contrib.Retina(opencv_core.Size inputSize, boolean colorMode)
public opencv_core.Size inputSize()
public opencv_core.Size outputSize()
public void setup(BytePointer retinaParameterFile, boolean applyDefaultSetupOnFailure)
retinaParameterFile - : the parameters filenameapplyDefaultSetupOnFailure - : set to true if an error must be thrown on errorpublic void setup()
public void setup(String retinaParameterFile, boolean applyDefaultSetupOnFailure)
public void setup(opencv_core.FileStorage fs, boolean applyDefaultSetupOnFailure)
fs - : the open Filestorage which contains retina parametersapplyDefaultSetupOnFailure - : set to true if an error must be thrown on errorpublic void setup(opencv_core.FileStorage fs)
public void setup(opencv_contrib.Retina.RetinaParameters newParameters)
newParameters - : a parameters structures updated with the new target configurationapplyDefaultSetupOnFailure - : set to true if an error must be thrown on errorpublic opencv_contrib.Retina.RetinaParameters getParameters()
public BytePointer printSetup()
public void write(BytePointer fs)
public void write(String fs)
public void write(opencv_core.FileStorage fs)
fs - : a cv::Filestorage object ready to be filledpublic void setupOPLandIPLParvoChannel(boolean colorMode,
boolean normaliseOutput,
float photoreceptorsLocalAdaptationSensitivity,
float photoreceptorsTemporalConstant,
float photoreceptorsSpatialConstant,
float horizontalCellsGain,
float HcellsTemporalConstant,
float HcellsSpatialConstant,
float ganglionCellsSensitivity)
colorMode - : specifies if (true) color is processed of not (false) to then processing gray level imagenormaliseOutput - : specifies if (true) output is rescaled between 0 and 255 of not (false)photoreceptorsLocalAdaptationSensitivity: - the photoreceptors sensitivity renage is 0-1 (more log compression effect when value increases)photoreceptorsTemporalConstant: - the time constant of the first order low pass filter of the photoreceptors, use it to cut high temporal frequencies (noise or fast motion), unit is frames, typical value is 1 framephotoreceptorsSpatialConstant: - the spatial constant of the first order low pass filter of the photoreceptors, use it to cut high spatial frequencies (noise or thick contours), unit is pixels, typical value is 1 pixelhorizontalCellsGain: - gain of the horizontal cells network, if 0, then the mean value of the output is zero, if the parameter is near 1, then, the luminance is not filtered and is still reachable at the output, typicall value is 0HcellsTemporalConstant: - the time constant of the first order low pass filter of the horizontal cells, use it to cut low temporal frequencies (local luminance variations), unit is frames, typical value is 1 frame, as the photoreceptorsHcellsSpatialConstant: - the spatial constant of the first order low pass filter of the horizontal cells, use it to cut low spatial frequencies (local luminance), unit is pixels, typical value is 5 pixel, this value is also used for local contrast computing when computing the local contrast adaptation at the ganglion cells level (Inner Plexiform Layer parvocellular channel model)ganglionCellsSensitivity: - the compression strengh of the ganglion cells local adaptation output, set a value between 160 and 250 for best results, a high value increases more the low value sensitivity... and the output saturates faster, recommended value: 230public void setupOPLandIPLParvoChannel()
public void setupIPLMagnoChannel(boolean normaliseOutput,
float parasolCells_beta,
float parasolCells_tau,
float parasolCells_k,
float amacrinCellsTemporalCutFrequency,
float V0CompressionParameter,
float localAdaptintegration_tau,
float localAdaptintegration_k)
normaliseOutput - : specifies if (true) output is rescaled between 0 and 255 of not (false)parasolCells_beta: - the low pass filter gain used for local contrast adaptation at the IPL level of the retina (for ganglion cells local adaptation), typical value is 0parasolCells_tau: - the low pass filter time constant used for local contrast adaptation at the IPL level of the retina (for ganglion cells local adaptation), unit is frame, typical value is 0 (immediate response)parasolCells_k: - the low pass filter spatial constant used for local contrast adaptation at the IPL level of the retina (for ganglion cells local adaptation), unit is pixels, typical value is 5amacrinCellsTemporalCutFrequency: - the time constant of the first order high pass fiter of the magnocellular way (motion information channel), unit is frames, tipicall value is 5V0CompressionParameter: - the compression strengh of the ganglion cells local adaptation output, set a value between 160 and 250 for best results, a high value increases more the low value sensitivity... and the output saturates faster, recommended value: 200localAdaptintegration_tau: - specifies the temporal constant of the low pas filter involved in the computation of the local "motion mean" for the local adaptation computationlocalAdaptintegration_k: - specifies the spatial constant of the low pas filter involved in the computation of the local "motion mean" for the local adaptation computationpublic void setupIPLMagnoChannel()
public void run(opencv_core.Mat inputImage)
inputImage - : the input cv::Mat image to be processed, can be gray level or BGR coded in any format (from 8bit to 16bits)public void getParvo(opencv_core.Mat retinaOutput_parvo)
retinaOutput_parvo - : the output buffer (reallocated if necessary), this output is rescaled for standard 8bits image processing use in OpenCVpublic void getParvo(opencv_contrib.FloatValArray retinaOutput_parvo)
retinaOutput_parvo - : the output buffer (reallocated if necessary), this output is the original retina filter model output, without any quantification or rescalingpublic void getMagno(opencv_core.Mat retinaOutput_magno)
retinaOutput_magno - : the output buffer (reallocated if necessary), this output is rescaled for standard 8bits image processing use in OpenCVpublic void getMagno(opencv_contrib.FloatValArray retinaOutput_magno)
retinaOutput_magno - : the output buffer (reallocated if necessary), this output is the original retina filter model output, without any quantification or rescalingpublic opencv_contrib.FloatValArray getMagno()
public opencv_contrib.FloatValArray getParvo()
public void setColorSaturation(boolean saturateColors,
float colorSaturationValue)
saturateColors: - boolean that activates color saturation (if true) or desactivate (if false)colorSaturationValue: - the saturation factorpublic void setColorSaturation()
public void clearBuffers()
public void activateMovingContoursProcessing(boolean activate)
activate: - true if Magnocellular output should be activated, false if notpublic void activateContoursProcessing(boolean activate)
activate: - true if Parvocellular (contours information extraction) output should be activated, false if notCopyright © 2014. All Rights Reserved.