Commit 06de0544 authored by Alexander Alekhin's avatar Alexander Alekhin

bioinspired: apply CV_OVERRIDE/CV_FINAL

parent f730de1a
...@@ -146,7 +146,7 @@ enum { ...@@ -146,7 +146,7 @@ enum {
</opencv_storage> </opencv_storage>
@endcode @endcode
*/ */
struct RetinaParameters{ struct RetinaParameters{
//! Outer Plexiform Layer (OPL) and Inner Plexiform Layer Parvocellular (IplParvo) parameters //! Outer Plexiform Layer (OPL) and Inner Plexiform Layer Parvocellular (IplParvo) parameters
struct OPLandIplParvoParameters{ struct OPLandIplParvoParameters{
OPLandIplParvoParameters():colorMode(true), OPLandIplParvoParameters():colorMode(true),
...@@ -208,7 +208,7 @@ class CV_EXPORTS_W Retina : public Algorithm { ...@@ -208,7 +208,7 @@ class CV_EXPORTS_W Retina : public Algorithm {
public: public:
/** @brief Retreive retina input buffer size /** @brief Retreive retina input buffer size
@return the retina input buffer size @return the retina input buffer size
*/ */
...@@ -260,7 +260,7 @@ public: ...@@ -260,7 +260,7 @@ public:
CV_WRAP virtual void write( String fs ) const=0; CV_WRAP virtual void write( String fs ) const=0;
/** @overload */ /** @overload */
virtual void write( FileStorage& fs ) const=0; virtual void write( FileStorage& fs ) const CV_OVERRIDE = 0;
/** @brief Setup the OPL and IPL parvo channels (see biologocal model) /** @brief Setup the OPL and IPL parvo channels (see biologocal model)
......
...@@ -80,7 +80,7 @@ namespace bioinspired ...@@ -80,7 +80,7 @@ namespace bioinspired
/** @brief parameter structure that stores the transient events detector setup parameters /** @brief parameter structure that stores the transient events detector setup parameters
*/ */
struct SegmentationParameters{ // CV_EXPORTS_W_MAP to export to python native dictionnaries struct SegmentationParameters{ // CV_EXPORTS_W_MAP to export to python native dictionnaries
// default structure instance construction with default values // default structure instance construction with default values
SegmentationParameters(): SegmentationParameters():
thresholdON(100), thresholdON(100),
thresholdOFF(100), thresholdOFF(100),
...@@ -171,7 +171,7 @@ public: ...@@ -171,7 +171,7 @@ public:
/** @brief write xml/yml formated parameters information /** @brief write xml/yml formated parameters information
@param fs : a cv::Filestorage object ready to be filled @param fs : a cv::Filestorage object ready to be filled
*/ */
virtual void write( cv::FileStorage& fs ) const=0; virtual void write( cv::FileStorage& fs ) const CV_OVERRIDE = 0;
/** @brief main processing method, get result using methods getSegmentationPicture() /** @brief main processing method, get result using methods getSegmentationPicture()
@param inputToSegment : the image to process, it must match the instance buffer size ! @param inputToSegment : the image to process, it must match the instance buffer size !
......
...@@ -487,7 +487,7 @@ namespace bioinspired ...@@ -487,7 +487,7 @@ namespace bioinspired
#endif #endif
} }
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
#ifdef DEBUG_TBB #ifdef DEBUG_TBB
std::cout<<"Parallel_horizontalAnticausalFilter::operator() :" std::cout<<"Parallel_horizontalAnticausalFilter::operator() :"
...@@ -520,7 +520,7 @@ namespace bioinspired ...@@ -520,7 +520,7 @@ namespace bioinspired
Parallel_horizontalCausalFilter_addInput(const float *bufferToAddAsInputProcess, float *bufferToProcess, const unsigned int idStart, const unsigned int nbCols, const float a, const float tau) Parallel_horizontalCausalFilter_addInput(const float *bufferToAddAsInputProcess, float *bufferToProcess, const unsigned int idStart, const unsigned int nbCols, const float a, const float tau)
:inputFrame(bufferToAddAsInputProcess), outputFrame(bufferToProcess), IDrowStart(idStart), nbColumns(nbCols), filterParam_a(a), filterParam_tau(tau){} :inputFrame(bufferToAddAsInputProcess), outputFrame(bufferToProcess), IDrowStart(idStart), nbColumns(nbCols), filterParam_a(a), filterParam_tau(tau){}
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
for (int IDrow=r.start; IDrow!=r.end; ++IDrow) for (int IDrow=r.start; IDrow!=r.end; ++IDrow)
{ {
float* outputPTR=outputFrame+(IDrowStart+IDrow)*nbColumns; float* outputPTR=outputFrame+(IDrowStart+IDrow)*nbColumns;
...@@ -545,7 +545,7 @@ namespace bioinspired ...@@ -545,7 +545,7 @@ namespace bioinspired
Parallel_verticalCausalFilter(float *bufferToProcess, const unsigned int nbRws, const unsigned int nbCols, const float a ) Parallel_verticalCausalFilter(float *bufferToProcess, const unsigned int nbRws, const unsigned int nbCols, const float a )
:outputFrame(bufferToProcess), nbRows(nbRws), nbColumns(nbCols), filterParam_a(a){} :outputFrame(bufferToProcess), nbRows(nbRws), nbColumns(nbCols), filterParam_a(a){}
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
for (int IDcolumn=r.start; IDcolumn!=r.end; ++IDcolumn) for (int IDcolumn=r.start; IDcolumn!=r.end; ++IDcolumn)
{ {
float result=0; float result=0;
...@@ -572,7 +572,7 @@ namespace bioinspired ...@@ -572,7 +572,7 @@ namespace bioinspired
Parallel_verticalAnticausalFilter_multGain(float *bufferToProcess, const unsigned int nbRws, const unsigned int nbCols, const float a, const float gain) Parallel_verticalAnticausalFilter_multGain(float *bufferToProcess, const unsigned int nbRws, const unsigned int nbCols, const float a, const float gain)
:outputFrame(bufferToProcess), nbRows(nbRws), nbColumns(nbCols), filterParam_a(a), filterParam_gain(gain){} :outputFrame(bufferToProcess), nbRows(nbRws), nbColumns(nbCols), filterParam_a(a), filterParam_gain(gain){}
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
float* offset=outputFrame+nbColumns*nbRows-nbColumns; float* offset=outputFrame+nbColumns*nbRows-nbColumns;
for (int IDcolumn=r.start; IDcolumn!=r.end; ++IDcolumn) for (int IDcolumn=r.start; IDcolumn!=r.end; ++IDcolumn)
{ {
...@@ -600,7 +600,7 @@ namespace bioinspired ...@@ -600,7 +600,7 @@ namespace bioinspired
Parallel_localAdaptation(const float *localLum, const float *inputImg, float *bufferToProcess, const float localLuminanceFact, const float localLuminanceAdd, const float maxInputVal) Parallel_localAdaptation(const float *localLum, const float *inputImg, float *bufferToProcess, const float localLuminanceFact, const float localLuminanceAdd, const float maxInputVal)
:localLuminance(localLum), inputFrame(inputImg),outputFrame(bufferToProcess), localLuminanceFactor(localLuminanceFact), localLuminanceAddon(localLuminanceAdd), maxInputValue(maxInputVal) {} :localLuminance(localLum), inputFrame(inputImg),outputFrame(bufferToProcess), localLuminanceFactor(localLuminanceFact), localLuminanceAddon(localLuminanceAdd), maxInputValue(maxInputVal) {}
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
const float *localLuminancePTR=localLuminance+r.start; const float *localLuminancePTR=localLuminance+r.start;
const float *inputFramePTR=inputFrame+r.start; const float *inputFramePTR=inputFrame+r.start;
float *outputFramePTR=outputFrame+r.start; float *outputFramePTR=outputFrame+r.start;
...@@ -626,7 +626,7 @@ namespace bioinspired ...@@ -626,7 +626,7 @@ namespace bioinspired
Parallel_horizontalAnticausalFilter_Irregular(float *bufferToProcess, const float *spatialConst, const unsigned int idEnd, const unsigned int nbCols) Parallel_horizontalAnticausalFilter_Irregular(float *bufferToProcess, const float *spatialConst, const unsigned int idEnd, const unsigned int nbCols)
:outputFrame(bufferToProcess), spatialConstantBuffer(spatialConst), IDrowEnd(idEnd), nbColumns(nbCols){} :outputFrame(bufferToProcess), spatialConstantBuffer(spatialConst), IDrowEnd(idEnd), nbColumns(nbCols){}
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
for (int IDrow=r.start; IDrow!=r.end; ++IDrow) for (int IDrow=r.start; IDrow!=r.end; ++IDrow)
{ {
...@@ -652,7 +652,7 @@ namespace bioinspired ...@@ -652,7 +652,7 @@ namespace bioinspired
Parallel_verticalCausalFilter_Irregular(float *bufferToProcess, const float *spatialConst, const unsigned int nbRws, const unsigned int nbCols) Parallel_verticalCausalFilter_Irregular(float *bufferToProcess, const float *spatialConst, const unsigned int nbRws, const unsigned int nbCols)
:outputFrame(bufferToProcess), spatialConstantBuffer(spatialConst), nbRows(nbRws), nbColumns(nbCols){} :outputFrame(bufferToProcess), spatialConstantBuffer(spatialConst), nbRows(nbRws), nbColumns(nbCols){}
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
for (int IDcolumn=r.start; IDcolumn!=r.end; ++IDcolumn) for (int IDcolumn=r.start; IDcolumn!=r.end; ++IDcolumn)
{ {
float result=0; float result=0;
......
...@@ -211,7 +211,7 @@ namespace bioinspired ...@@ -211,7 +211,7 @@ namespace bioinspired
Parallel_amacrineCellsComputing(const float *OPL_ON_PTR, const float *OPL_OFF_PTR, float *previousInput_ON_PTR, float *previousInput_OFF_PTR, float *amacrinCellsTempOutput_ON_PTR, float *amacrinCellsTempOutput_OFF_PTR, float temporalCoefficientVal) Parallel_amacrineCellsComputing(const float *OPL_ON_PTR, const float *OPL_OFF_PTR, float *previousInput_ON_PTR, float *previousInput_OFF_PTR, float *amacrinCellsTempOutput_ON_PTR, float *amacrinCellsTempOutput_OFF_PTR, float temporalCoefficientVal)
:OPL_ON(OPL_ON_PTR), OPL_OFF(OPL_OFF_PTR), previousInput_ON(previousInput_ON_PTR), previousInput_OFF(previousInput_OFF_PTR), amacrinCellsTempOutput_ON(amacrinCellsTempOutput_ON_PTR), amacrinCellsTempOutput_OFF(amacrinCellsTempOutput_OFF_PTR), temporalCoefficient(temporalCoefficientVal) {} :OPL_ON(OPL_ON_PTR), OPL_OFF(OPL_OFF_PTR), previousInput_ON(previousInput_ON_PTR), previousInput_OFF(previousInput_OFF_PTR), amacrinCellsTempOutput_ON(amacrinCellsTempOutput_ON_PTR), amacrinCellsTempOutput_OFF(amacrinCellsTempOutput_OFF_PTR), temporalCoefficient(temporalCoefficientVal) {}
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
const float *OPL_ON_PTR=OPL_ON+r.start; const float *OPL_ON_PTR=OPL_ON+r.start;
const float *OPL_OFF_PTR=OPL_OFF+r.start; const float *OPL_OFF_PTR=OPL_OFF+r.start;
float *previousInput_ON_PTR= previousInput_ON+r.start; float *previousInput_ON_PTR= previousInput_ON+r.start;
......
...@@ -234,7 +234,7 @@ private: ...@@ -234,7 +234,7 @@ private:
Parallel_OPL_OnOffWaysComputing(float *photoreceptorsOutput_PTR, float *horizontalCellsOutput_PTR, float *bipolarCellsON_PTR, float *bipolarCellsOFF_PTR, float *parvocellularOutputON_PTR, float *parvocellularOutputOFF_PTR) Parallel_OPL_OnOffWaysComputing(float *photoreceptorsOutput_PTR, float *horizontalCellsOutput_PTR, float *bipolarCellsON_PTR, float *bipolarCellsOFF_PTR, float *parvocellularOutputON_PTR, float *parvocellularOutputOFF_PTR)
:photoreceptorsOutput(photoreceptorsOutput_PTR), horizontalCellsOutput(horizontalCellsOutput_PTR), bipolarCellsON(bipolarCellsON_PTR), bipolarCellsOFF(bipolarCellsOFF_PTR), parvocellularOutputON(parvocellularOutputON_PTR), parvocellularOutputOFF(parvocellularOutputOFF_PTR) {} :photoreceptorsOutput(photoreceptorsOutput_PTR), horizontalCellsOutput(horizontalCellsOutput_PTR), bipolarCellsON(bipolarCellsON_PTR), bipolarCellsOFF(bipolarCellsOFF_PTR), parvocellularOutputON(parvocellularOutputON_PTR), parvocellularOutputOFF(parvocellularOutputOFF_PTR) {}
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
// compute bipolar cells response equal to photoreceptors minus horizontal cells response // compute bipolar cells response equal to photoreceptors minus horizontal cells response
// and copy the result on parvo cellular outputs... keeping time before their local contrast adaptation for final result // and copy the result on parvo cellular outputs... keeping time before their local contrast adaptation for final result
float *photoreceptorsOutput_PTR= photoreceptorsOutput+r.start; float *photoreceptorsOutput_PTR= photoreceptorsOutput+r.start;
......
This diff is collapsed.
...@@ -627,44 +627,44 @@ private: ...@@ -627,44 +627,44 @@ private:
void _runGrayToneMapping(const UMat &grayImageInput, UMat &grayImageOutput , const float PhotoreceptorsCompression = 0.6, const float ganglionCellsCompression = 0.6); void _runGrayToneMapping(const UMat &grayImageInput, UMat &grayImageOutput , const float PhotoreceptorsCompression = 0.6, const float ganglionCellsCompression = 0.6);
}; };
class RetinaOCLImpl : public Retina class RetinaOCLImpl CV_FINAL : public Retina
{ {
public: public:
RetinaOCLImpl(Size getInputSize); RetinaOCLImpl(Size getInputSize);
RetinaOCLImpl(Size getInputSize, const bool colorMode, int colorSamplingMethod = RETINA_COLOR_BAYER, const bool useRetinaLogSampling = false, const double reductionFactor = 1.0, const double samplingStrenght = 10.0); RetinaOCLImpl(Size getInputSize, const bool colorMode, int colorSamplingMethod = RETINA_COLOR_BAYER, const bool useRetinaLogSampling = false, const double reductionFactor = 1.0, const double samplingStrenght = 10.0);
virtual ~RetinaOCLImpl(); virtual ~RetinaOCLImpl() CV_OVERRIDE;
Size getInputSize(); Size getInputSize() CV_OVERRIDE;
Size getOutputSize(); Size getOutputSize() CV_OVERRIDE;
void setup(String retinaParameterFile = "", const bool applyDefaultSetupOnFailure = true); void setup(String retinaParameterFile = "", const bool applyDefaultSetupOnFailure = true) CV_OVERRIDE;
void setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure = true); void setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure = true) CV_OVERRIDE;
void setup(RetinaParameters newParameters); void setup(RetinaParameters newParameters) CV_OVERRIDE;
RetinaParameters getParameters(); RetinaParameters getParameters() CV_OVERRIDE;
const String printSetup(); const String printSetup() CV_OVERRIDE;
virtual void write(String fs) const; virtual void write(String fs) const CV_OVERRIDE;
virtual void write(FileStorage& fs) const; virtual void write(FileStorage& fs) const CV_OVERRIDE;
void setupOPLandIPLParvoChannel(const bool colorMode = true, const bool normaliseOutput = true, const float photoreceptorsLocalAdaptationSensitivity = 0.7, const float photoreceptorsTemporalConstant = 0.5, const float photoreceptorsSpatialConstant = 0.53, const float horizontalCellsGain = 0, const float HcellsTemporalConstant = 1, const float HcellsSpatialConstant = 7, const float ganglionCellsSensitivity = 0.7); void setupOPLandIPLParvoChannel(const bool colorMode = true, const bool normaliseOutput = true, const float photoreceptorsLocalAdaptationSensitivity = 0.7, const float photoreceptorsTemporalConstant = 0.5, const float photoreceptorsSpatialConstant = 0.53, const float horizontalCellsGain = 0, const float HcellsTemporalConstant = 1, const float HcellsSpatialConstant = 7, const float ganglionCellsSensitivity = 0.7) CV_OVERRIDE;
void setupIPLMagnoChannel(const bool normaliseOutput = true, const float parasolCells_beta = 0, const float parasolCells_tau = 0, const float parasolCells_k = 7, const float amacrinCellsTemporalCutFrequency = 1.2, const float V0CompressionParameter = 0.95, const float localAdaptintegration_tau = 0, const float localAdaptintegration_k = 7); void setupIPLMagnoChannel(const bool normaliseOutput = true, const float parasolCells_beta = 0, const float parasolCells_tau = 0, const float parasolCells_k = 7, const float amacrinCellsTemporalCutFrequency = 1.2, const float V0CompressionParameter = 0.95, const float localAdaptintegration_tau = 0, const float localAdaptintegration_k = 7) CV_OVERRIDE;
void run(InputArray inputImage); void run(InputArray inputImage) CV_OVERRIDE;
void getParvo(OutputArray retinaOutput_parvo); void getParvo(OutputArray retinaOutput_parvo) CV_OVERRIDE;
void getMagno(OutputArray retinaOutput_magno); void getMagno(OutputArray retinaOutput_magno) CV_OVERRIDE;
void setColorSaturation(const bool saturateColors = true, const float colorSaturationValue = 4.0); void setColorSaturation(const bool saturateColors = true, const float colorSaturationValue = 4.0) CV_OVERRIDE;
void clearBuffers(); void clearBuffers() CV_OVERRIDE;
void activateMovingContoursProcessing(const bool activate); void activateMovingContoursProcessing(const bool activate) CV_OVERRIDE;
void activateContoursProcessing(const bool activate); void activateContoursProcessing(const bool activate) CV_OVERRIDE;
// unimplemented interfaces: // unimplemented interfaces:
void applyFastToneMapping(InputArray /*inputImage*/, OutputArray /*outputToneMappedImage*/); void applyFastToneMapping(InputArray /*inputImage*/, OutputArray /*outputToneMappedImage*/) CV_OVERRIDE;
void getParvoRAW(OutputArray /*retinaOutput_parvo*/); void getParvoRAW(OutputArray /*retinaOutput_parvo*/) CV_OVERRIDE;
void getMagnoRAW(OutputArray /*retinaOutput_magno*/); void getMagnoRAW(OutputArray /*retinaOutput_magno*/) CV_OVERRIDE;
const Mat getMagnoRAW() const; const Mat getMagnoRAW() const CV_OVERRIDE;
const Mat getParvoRAW() const; const Mat getParvoRAW() const CV_OVERRIDE;
protected: protected:
RetinaParameters _retinaParameters; RetinaParameters _retinaParameters;
......
...@@ -289,7 +289,7 @@ namespace bioinspired ...@@ -289,7 +289,7 @@ namespace bioinspired
Parallel_adaptiveHorizontalCausalFilter_addInput(const float *inputImg, float *bufferToProcess, const float *imageGrad, const unsigned int nbCols) Parallel_adaptiveHorizontalCausalFilter_addInput(const float *inputImg, float *bufferToProcess, const float *imageGrad, const unsigned int nbCols)
:outputFrame(bufferToProcess), inputFrame(inputImg), imageGradient(imageGrad), nbColumns(nbCols) { } :outputFrame(bufferToProcess), inputFrame(inputImg), imageGradient(imageGrad), nbColumns(nbCols) { }
virtual void operator()( const Range& r ) const virtual void operator()( const Range& r ) const CV_OVERRIDE
{ {
float* outputPTR=outputFrame+r.start*nbColumns; float* outputPTR=outputFrame+r.start*nbColumns;
const float* inputPTR=inputFrame+r.start*nbColumns; const float* inputPTR=inputFrame+r.start*nbColumns;
...@@ -317,7 +317,7 @@ namespace bioinspired ...@@ -317,7 +317,7 @@ namespace bioinspired
Parallel_adaptiveVerticalAnticausalFilter_multGain(float *bufferToProcess, const float *imageGrad, const unsigned int nbRws, const unsigned int nbCols, const float gain) Parallel_adaptiveVerticalAnticausalFilter_multGain(float *bufferToProcess, const float *imageGrad, const unsigned int nbRws, const unsigned int nbCols, const float gain)
:outputFrame(bufferToProcess), imageGradient(imageGrad), nbRows(nbRws), nbColumns(nbCols), filterParam_gain(gain) { } :outputFrame(bufferToProcess), imageGradient(imageGrad), nbRows(nbRws), nbColumns(nbCols), filterParam_gain(gain) { }
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
float* offset=outputFrame+nbColumns*nbRows-nbColumns; float* offset=outputFrame+nbColumns*nbRows-nbColumns;
const float* gradOffset= imageGradient+nbColumns*nbRows-nbColumns; const float* gradOffset= imageGradient+nbColumns*nbRows-nbColumns;
for (int IDcolumn=r.start; IDcolumn!=r.end; ++IDcolumn) for (int IDcolumn=r.start; IDcolumn!=r.end; ++IDcolumn)
...@@ -346,7 +346,7 @@ namespace bioinspired ...@@ -346,7 +346,7 @@ namespace bioinspired
Parallel_computeGradient(const unsigned int nbCols, const unsigned int nbRws, const float *lum, float *imageGrad) Parallel_computeGradient(const unsigned int nbCols, const unsigned int nbRws, const float *lum, float *imageGrad)
:imageGradient(imageGrad), luminance(lum), nbColumns(nbCols), doubleNbColumns(2*nbCols), nbRows(nbRws), nbPixels(nbRws*nbCols) { } :imageGradient(imageGrad), luminance(lum), nbColumns(nbCols), doubleNbColumns(2*nbCols), nbRows(nbRws), nbPixels(nbRws*nbCols) { }
virtual void operator()( const Range& r ) const { virtual void operator()( const Range& r ) const CV_OVERRIDE {
for (int idLine=r.start;idLine!=r.end;++idLine) for (int idLine=r.start;idLine!=r.end;++idLine)
{ {
for (unsigned int idColumn=2;idColumn<nbColumns-2;++idColumn) for (unsigned int idColumn=2;idColumn<nbColumns-2;++idColumn)
......
...@@ -132,7 +132,7 @@ public: ...@@ -132,7 +132,7 @@ public:
@param inputImage the input image to process RGB or gray levels @param inputImage the input image to process RGB or gray levels
@param outputToneMappedImage the output tone mapped image @param outputToneMappedImage the output tone mapped image
*/ */
virtual void applyFastToneMapping(InputArray inputImage, OutputArray outputToneMappedImage) virtual void applyFastToneMapping(InputArray inputImage, OutputArray outputToneMappedImage) CV_OVERRIDE
{ {
// first convert input image to the compatible format : // first convert input image to the compatible format :
const bool colorMode = _convertCvMat2ValarrayBuffer(inputImage.getMat(), _inputBuffer); const bool colorMode = _convertCvMat2ValarrayBuffer(inputImage.getMat(), _inputBuffer);
...@@ -157,7 +157,7 @@ public: ...@@ -157,7 +157,7 @@ public:
* @param ganglioncellsNeighborhoodRadius the second stage local adaptation area * @param ganglioncellsNeighborhoodRadius the second stage local adaptation area
* @param meanLuminanceModulatorK the factor applied to modulate the meanLuminance information (default is 1, see reference paper) * @param meanLuminanceModulatorK the factor applied to modulate the meanLuminance information (default is 1, see reference paper)
*/ */
virtual void setup(const float photoreceptorsNeighborhoodRadius=3.f, const float ganglioncellsNeighborhoodRadius=1.f, const float meanLuminanceModulatorK=1.f) virtual void setup(const float photoreceptorsNeighborhoodRadius=3.f, const float ganglioncellsNeighborhoodRadius=1.f, const float meanLuminanceModulatorK=1.f) CV_OVERRIDE
{ {
// setup the spatio-temporal properties of each filter // setup the spatio-temporal properties of each filter
_meanLuminanceModulatorK = meanLuminanceModulatorK; _meanLuminanceModulatorK = meanLuminanceModulatorK;
......
...@@ -94,7 +94,7 @@ public: ...@@ -94,7 +94,7 @@ public:
Parallel_clipBufferValues(type* bufferToProcess, const type min, const type max) Parallel_clipBufferValues(type* bufferToProcess, const type min, const type max)
: bufferToClip(bufferToProcess), minValue(min), maxValue(max) { } : bufferToClip(bufferToProcess), minValue(min), maxValue(max) { }
virtual void operator()( const cv::Range &r ) const { virtual void operator()( const cv::Range &r ) const CV_OVERRIDE {
type *inputOutputBufferPTR=bufferToClip+r.start; type *inputOutputBufferPTR=bufferToClip+r.start;
for (int jf = r.start; jf != r.end; ++jf, ++inputOutputBufferPTR) for (int jf = r.start; jf != r.end; ++jf, ++inputOutputBufferPTR)
{ {
......
...@@ -227,17 +227,17 @@ class TransientAreasSegmentationModuleImpl_: public TransientAreasSegmentationM ...@@ -227,17 +227,17 @@ class TransientAreasSegmentationModuleImpl_: public TransientAreasSegmentationM
{ {
public: public:
TransientAreasSegmentationModuleImpl_(const Size size):_segmTool(size){} TransientAreasSegmentationModuleImpl_(const Size size):_segmTool(size){}
inline virtual Size getSize(){return _segmTool.getSize();} inline virtual Size getSize() CV_OVERRIDE { return _segmTool.getSize(); }
inline virtual void write( cv::FileStorage& fs ) const{_segmTool.write(fs);} inline virtual void write( cv::FileStorage& fs ) const CV_OVERRIDE { _segmTool.write(fs); }
inline virtual void setup(String segmentationParameterFile, const bool applyDefaultSetupOnFailure){_segmTool.setup(segmentationParameterFile, applyDefaultSetupOnFailure);} inline virtual void setup(String segmentationParameterFile, const bool applyDefaultSetupOnFailure) CV_OVERRIDE { _segmTool.setup(segmentationParameterFile, applyDefaultSetupOnFailure); }
inline virtual void setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure){_segmTool.setup(fs, applyDefaultSetupOnFailure);} inline virtual void setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure) CV_OVERRIDE { _segmTool.setup(fs, applyDefaultSetupOnFailure); }
inline virtual void setup(SegmentationParameters newParameters){_segmTool.setup(newParameters);} inline virtual void setup(SegmentationParameters newParameters) CV_OVERRIDE { _segmTool.setup(newParameters); }
inline virtual const String printSetup(){return _segmTool.printSetup();} inline virtual const String printSetup() CV_OVERRIDE { return _segmTool.printSetup(); }
inline virtual struct SegmentationParameters getParameters(){return _segmTool.getParameters();} inline virtual struct SegmentationParameters getParameters() CV_OVERRIDE { return _segmTool.getParameters(); }
inline virtual void write( String fs ) const{_segmTool.write(fs);} inline virtual void write( String fs ) const CV_OVERRIDE { _segmTool.write(fs); }
inline virtual void run(InputArray inputToSegment, const int channelIndex){_segmTool.run(inputToSegment, channelIndex);} inline virtual void run(InputArray inputToSegment, const int channelIndex) CV_OVERRIDE { _segmTool.run(inputToSegment, channelIndex); }
inline virtual void getSegmentationPicture(OutputArray transientAreas){return _segmTool.getSegmentationPicture(transientAreas);} inline virtual void getSegmentationPicture(OutputArray transientAreas) CV_OVERRIDE { return _segmTool.getSegmentationPicture(transientAreas); }
inline virtual void clearAllBuffers(){_segmTool.clearAllBuffers();} inline virtual void clearAllBuffers() CV_OVERRIDE { _segmTool.clearAllBuffers(); }
private: private:
TransientAreasSegmentationModuleImpl _segmTool; TransientAreasSegmentationModuleImpl _segmTool;
...@@ -520,7 +520,7 @@ void TransientAreasSegmentationModuleImpl::_convertValarrayBuffer2cvMat(const st ...@@ -520,7 +520,7 @@ void TransientAreasSegmentationModuleImpl::_convertValarrayBuffer2cvMat(const st
{ {
// fill output buffer with the valarray buffer // fill output buffer with the valarray buffer
const bool *valarrayPTR=get_data(grayMatrixToConvert); const bool *valarrayPTR=get_data(grayMatrixToConvert);
outBuffer.create(cv::Size(nbColumns, nbRows), CV_8U); outBuffer.create(cv::Size(nbColumns, nbRows), CV_8U);
Mat outMat = outBuffer.getMat(); Mat outMat = outBuffer.getMat();
for (unsigned int i=0;i<nbRows;++i) for (unsigned int i=0;i<nbRows;++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment