I wanted to convert a cv::MAT image to a CVD::Image but i don't know how can I do. The reason is because previously I had a CVD::Image and I transformed it to cv::MAT in order to set a ROI region in the image, and now, I need the picture in CVD. The code used to perform it, it's the following:
CVD::Image<CVD::byte> Imatge_a_modificar;
Imatge_a_modificar.copy_from(mimFrameBW_workingCopy); //The image is copied from another one
int x = frameWidth/2;
int y = frameHeight/2;
CvRect sROI = cvRect(x,y, frameWidth/2, frameHeight/2);
int xroi = sROI.x;
int yroi = sROI.y;
cv::Mat image(frameWidth,frameHeight,CV_8UC4,Imatge_a_modificar.data());
cv::Mat imageROI(image, sROI);