I have been trying to achieve something which should pretty trivial and is trivial in Matlab.
I want to simply achieve something such as:
cv::Ma
For big Mats you should use forEach.
If C++11 is available:
m.forEach([&](double& element, const int position[]) -> void { element *= 5; } );