[BUGFIX] Fix filter being x/y flipped.
This commit is contained in:
parent
afdb507c9b
commit
e0f93f3bbc
|
@ -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
|
||||
}
|
||||
/****************************************************************************************
|
||||
*
|
||||
|
|
|
@ -170,6 +170,7 @@ class ImageViewer : public QMainWindow {
|
|||
void changeFilterSize(int s);
|
||||
void applyBasicFilter();
|
||||
void applyBasicFilterWithOverflowHandling();
|
||||
void runCannyEdge(void);
|
||||
|
||||
void open();
|
||||
void openReference();
|
||||
|
|
Loading…
Reference in New Issue