문제

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?

도움이 되었습니까?

해결책

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);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top