Frage

I've done a few examples in openCV and managed to do a background subtraction using 2 images. The background, and the other picture with the background and an object.

Through this I was able to get only the binary form of the object.

I was wondering if I could do the same if I use a raw hex array of data that came from OV7670 to my STM32 MCU and then passed to the PC, for the same background subtraction scheme.

Is is possible to still treat it as if I was using .png pictures? or does the raw hex array need to be treated differently in order to get the same effect? Isn't Mat just an array too containing my image.png before?

War es hilfreich?

Lösung

if your hex data is just a byte/pixel array, you can easily construct a Mat from that:

uchar *pixels;

Mat m(h,w,CV_8U,pixels);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top