From e196aea3792d05041d591ace4bc3b0c6cc55bb1e Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 30 May 2017 19:18:12 +0200 Subject: [PATCH] [CCV] Fixed visualization of DOG Signed-off-by: Jim Martens --- ccv/saliency/includes/lab_pyramid.h | 2 +- ccv/saliency/lab_pyramid.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ccv/saliency/includes/lab_pyramid.h b/ccv/saliency/includes/lab_pyramid.h index 09dea02..056c22e 100644 --- a/ccv/saliency/includes/lab_pyramid.h +++ b/ccv/saliency/includes/lab_pyramid.h @@ -91,7 +91,7 @@ public: * @param surround the surround pyramid * @param number_of_layers the number of layers used to create the two pyramids */ - void static compute_dog(lab_pyramid center, lab_pyramid surround, int number_of_layers); + void static compute_dog(const lab_pyramid center, const lab_pyramid surround, int number_of_layers); /** * Visualizes the center-surround and surround-center contrasts. They have to be computed first. diff --git a/ccv/saliency/lab_pyramid.cpp b/ccv/saliency/lab_pyramid.cpp index 33981eb..0ab42be 100644 --- a/ccv/saliency/lab_pyramid.cpp +++ b/ccv/saliency/lab_pyramid.cpp @@ -75,7 +75,7 @@ gauss_pyramid lab_pyramid::get_pyramid(int channel) const } } -void lab_pyramid::compute_dog(lab_pyramid center, lab_pyramid surround, int number_of_layers) { +void lab_pyramid::compute_dog(const lab_pyramid center, const lab_pyramid surround, int number_of_layers) { _number_of_layers = number_of_layers; // L channel @@ -184,11 +184,11 @@ void lab_pyramid::visualize_dog() { cv::namedWindow("CS A"); cv::imshow("CS A", _cs_contrast_a.at(layer)); cv::namedWindow("SC A"); - cv::imshow("SC A", _cs_contrast_a.at(layer)); + cv::imshow("SC A", _sc_contrast_a.at(layer)); cv::namedWindow("CS B"); cv::imshow("CS B", _cs_contrast_b.at(layer)); cv::namedWindow("SC B"); - cv::imshow("SC B", _cs_contrast_b.at(layer)); + cv::imshow("SC B", _sc_contrast_b.at(layer)); cv::waitKey(0); } }