diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index 1b4725a..aafa773 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -548,7 +548,7 @@ void ImageViewer::applyBasicFilter() { QColor color = QColor::fromRgb(original->getImage()->pixel(x+dx, y+dy)); color.getHsl(&h, &s, &l); //std::cout << "[" << fx << "," << fy <<"] " << l << " * " << data[fx*filter_size + fy] << " = "; - intensity_sum += (l * data[fx*filter_size + fy]); + intensity_sum += (l * data[fy*filter_size + fx]); //std::cout << intensity_sum << std::endl; } } @@ -619,7 +619,7 @@ void ImageViewer::applyBasicFilterWithOverflowHandling() { QColor color = QColor::fromRgb(original->getPixel(x+dx, y+dy, overflow_mode)); color.getHsl(&h, &s, &l); //std::cout << "[" << fx << "," << fy <<"] " << l << " * " << data[fx*filter_size + fy] << " = "; - intensity_sum += (l * data[fx*filter_size + fy]); + intensity_sum += (l * data[fy*filter_size + fx]); //std::cout << intensity_sum << std::endl; } } @@ -649,7 +649,7 @@ void ImageViewer::applyBasicFilterWithOverflowHandling() { * @brief ImageViewer::runCannyEdge */ void ImageViewer::runCannyEdge(void) { - + //TODO } /**************************************************************************************** * diff --git a/imageviewer-qt4.h b/imageviewer-qt4.h index 1f7a299..3a8f942 100644 --- a/imageviewer-qt4.h +++ b/imageviewer-qt4.h @@ -170,6 +170,7 @@ class ImageViewer : public QMainWindow { void changeFilterSize(int s); void applyBasicFilter(); void applyBasicFilterWithOverflowHandling(); + void runCannyEdge(void); void open(); void openReference();