Is there a difference between declaring Mats as global variables or local variables, in terms of the amount of time it takes to perform various different convolutions on them? For example, I performed a mean shift filtering on an image, once using a global Mat, and once using a local Mat in main, then passing it as a pointer to a mean shift filtering function. I timed both of them, and they were nearly identical, but not quite the same.
This led me to wonder about the difference between declaring a Mat as a global variable vs. local/pointers. Any help?
Thanks!