One of the possibilities of changing the cv::Mat would be to take part of the data with ROI and change their values what in the end would mean, that the values of original cv::Mat were changed. Is it somehow possible that such operation (or any other, which I didn't think about, excluding some dirty tricks with casting) would change the values of the const cv::Mat or can I assume that this will not be allowed and every const Mat is safe for changes?
The problem could be that under the hood we are dealing with smart pointers, but maybe this is not an issue, it was somehow taken care of?