Question

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?

Was it helpful?

Solution

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);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top