#include <opencv2/opencv.hpp> #include <cstdlib> using namespace cv; using namespace std; template <typename T> T PosToActual(T min, T max, int pos, int TICKS) { return min + (max - min) * pos / TICKS; } bool invalidate = true; void Invalidator(int, void *) { invalidate = true; } int main() { string path = (string)getenv("RESOURCES") + "\\gollum.jpg"; Mat original = imread(path, cv::IMREAD_GRAYSCALE); Mat modified = original.clone(); // Mat::zeros(cv::Size(original.cols, original.rows), CV_8U);