From a659e287fb643350b31e4dc4f9a1be884f595743 Mon Sep 17 00:00:00 2001 From: alexandre benoit Date: Tue, 30 Apr 2013 14:52:14 +0200 Subject: [PATCH] minor error correction --- modules/contrib/src/retina.cpp | 12 ++++++------ .../cpp/tutorial_code/contrib/retina_tutorial.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/contrib/src/retina.cpp b/modules/contrib/src/retina.cpp index 663aa8bd4..dfc1d66a3 100644 --- a/modules/contrib/src/retina.cpp +++ b/modules/contrib/src/retina.cpp @@ -564,8 +564,8 @@ void RetinaImpl::getParvoRAW(cv::Mat &parvoOutputBufferCopy){ // original API level data accessors : get buffers addresses... const Mat RetinaImpl::getMagnoRAW() const { // create a cv::Mat header for the valarray - //const cv::Mat output= - return Mat(_retinaFilter->getMovingContours().size(),1, CV_32F, (void*)(&_retinaFilter->getMovingContours()[0])); + const float *retinaMagnoFilterOutputPTR=&(_retinaFilter->getMovingContours()[0]); + return Mat(_retinaFilter->getMovingContours().size(),1, CV_32F, (void*)retinaMagnoFilterOutputPTR); } @@ -573,13 +573,13 @@ const Mat RetinaImpl::getParvoRAW() const { if (_retinaFilter->getColorMode()) // check if color mode is enabled { // create a cv::Mat table (for RGB planes as a single vector) - const float *retinaFilterOutputPTR=&(_retinaFilter->getColorOutput()[0]); - return Mat(_retinaFilter->getColorOutput().size(), 1, CV_32F, (void*)retinaFilterOutputPTR); + const float *retinaParvoFilterOutputPTR=&(_retinaFilter->getColorOutput()[0]); + return Mat(_retinaFilter->getColorOutput().size(), 1, CV_32F, (void*)retinaParvoFilterOutputPTR); } // otherwise, output is gray level // create a cv::Mat header for the valarray - const float *retinaFilterOutputPTR=&(_retinaFilter->getContours()[0]); - return Mat( _retinaFilter->getContours().size(), 1, CV_32F, (void*)retinaFilterOutputPTR); + const float *retinaParvoFilterOutputPTR=&(_retinaFilter->getContours()[0]); + return Mat( _retinaFilter->getContours().size(), 1, CV_32F, (void*)retinaParvoFilterOutputPTR); } // private method called by constructirs diff --git a/samples/cpp/tutorial_code/contrib/retina_tutorial.cpp b/samples/cpp/tutorial_code/contrib/retina_tutorial.cpp index 3621f18dc..646a39062 100644 --- a/samples/cpp/tutorial_code/contrib/retina_tutorial.cpp +++ b/samples/cpp/tutorial_code/contrib/retina_tutorial.cpp @@ -39,7 +39,7 @@ int main(int argc, char* argv[]) { // welcome message std::cout<<"****************************************************"<