1 | initial version |
I would suggest you to do
CameraImage::CameraImage(const cv::Mat &image) : mImage(image) {}
The idea of using clone
or copyTo
is when you are having a Mat parameter (not const) that you want not to change, and you do some modifications on it (like conversions, or drawings, or stuffs like that).
Please review the docs about Mat, especially = operator