//Sorry for my english.
Tell me please, what I am doing wrong? I have read a lot about this. And write some code, but I have a terrible result.
As I
Thanks a Lot! It is realy works! But. Why does memory whas spoiled? First. I have some memory load incv::Mat
cv::Mat mat1 = cv::imread("bugero.jpg",3);
mat1 - [=====================================]
then I put a copy of this cvMat to other cv:Mat
cv::Mat temp(src.cols,src.rows,src.type());
cvtColor(src, temp,CV_BGR2RGB);
mat1 - [=========================================]
temp - [=========================================]
then make QImage from this data QImage dest= QImage((uchar*) temp.data, temp.cols, temp.rows, temp.step, QImage::Format_RGB888);
mat1 - [============================================]
temp - > [============================================]
/
dest --/
And then temp goes out of scope and delete it self? QImage does not take ownership of it so memory in temp1 and dest marked as free, and there compiler can put other data? Is I am right?