Fixing OpenCV::Mat problem about reference