I want to match my code into a given interface. Inside my class OperateImage in all methods I use cv::Mat format. When putting it in SubMain function which uses cv::Mat3b and returns cv::Mat1b it does not work. How can I change it so that I can use my written class? I am sure there must exist simple conversion which however I did not find, I am beginning in opencv. Thank you in advance for help. Will be very grateful if someone can shortly point out when it makes sense to use Mat1b/Mat3b instead of Mat, what is their role? (I always saw examples using Mat.)
cv::Mat1b SubMain(const cv::Mat3b& img)
{
OperateImage opImg(img);
opImg.Trafo(img); // being used as reference in my methods
return img;
}