I want to read a fixed-size-submat from a bigger Mat while sliding it over the bigger one pixel by pixel (or maybe 5 pixel by 5 pixel or somtheing like that, i hope you get the idea). Is there a predefined function for that in openCV, if so which one is it? (Besides i am using Java with opencv 2.4.5..) I have an idea how to write it myself in java using Mat.submat(a,b,c,d), but i thought that the underlying c++ dll implementation would be a lot faster.