1 | initial version |
this is a "shallow" copy (it will copy the Mat header & the data pointer, but NOT the pixels):
mRgba = inputFrame.rgba();
same here:
Mat mRgba2 = inputFrame.rgba();
so, both Mats point to the same data now !
if you draw something into mRgba2, it will show up in mRgba, too.
to avoid it, you need a "deep" copy:
Mat mRgba2 = inputFrame.rgba().clone();