Ask Your Question

Revision history [back]

Please note that Passing an OpenCV Mat is same as pass by reference, the only difference is that only the Mat headers will be copied separately! So your mask will be modified inside your function at dilate(). You can easily debug this by adding imshow before and after calling your highlight().

So please modify your code accordingly! For more details please refer this answer!