I have reshape a 2d grayscale image to a 1d Mat.I want to access and change each pixel.Each pixel should be 0-255
Mat input_img = imread(argv[1], IMREAD_GRAYSCALE);
Mat input_vector = input_img.reshape(0,1);
std::cout << input_1d_vector.at<int>(0,1);
However it is not ouputing a sensible pixel value.My apologies if its a dumb question , i am new with opencv