1 | initial version |
please clone() your Mat before leaving DisplayVideoQt::QImage2Mat
:
return res.clone();
the Mat constructor you're using won't copy pixels (only the pointer), also cvtColor won't make a new Mat (same size/channel count), so, right now, you have a "dangling pointer", when you leave the function.