Also note the extra parentheses required to avoid compilation errors. In this post i would like to discuss what happens when cv mat is passed around. Actually no real array elements matrix can be passed to a function array pointers are the arguments that are passed to a function.