added get methods for retina outputs

This commit is contained in:
Alexandre Benoit 2012-02-10 13:25:33 +00:00
parent ef8c263500
commit c07d9d75e8
2 changed files with 7 additions and 0 deletions

View File

@ -288,6 +288,10 @@ public:
*/
void getMagno(std::valarray<float> &retinaOutput_magno);
// original API level data accessors : get buffers addresses...
const std::valarray<float> & getMagno() const;
const std::valarray<float> & getParvo() const;
/**
* 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.

View File

@ -337,6 +337,9 @@ void Retina::getMagno(cv::Mat &retinaOutput_magno)
// original API level data accessors : copy buffers if size matches
void Retina::getMagno(std::valarray<float> &magnoOutputBufferCopy){if (magnoOutputBufferCopy.size()==_retinaFilter->getMovingContours().size()) magnoOutputBufferCopy = _retinaFilter->getMovingContours();}
void Retina::getParvo(std::valarray<float> &parvoOutputBufferCopy){if (parvoOutputBufferCopy.size()==_retinaFilter->getContours().size()) parvoOutputBufferCopy = _retinaFilter->getContours();}
// original API level data accessors : get buffers addresses...
const std::valarray<float> & Retina::getMagno() const {return _retinaFilter->getMovingContours();}
const std::valarray<float> & Retina::getParvo() const {if (_retinaFilter->getColorMode())return _retinaFilter->getColorOutput(); /* implicite else */return _retinaFilter->getContours();}
// private method called by constructirs
void Retina::_init(const cv::Size inputSize, const bool colorMode, RETINA_COLORSAMPLINGMETHOD colorSamplingMethod, const bool useRetinaLogSampling, const double reductionFactor, const double samplingStrenght)