heHey guys,
So I'm creating a Mat from camera buffers that I'm receiving like so:
cv::Mat src = cv::Mat(cv::Size(img_height, img_width),CV_8UC4);
memcpy(src.ptr(), (void*) img_buffer,img_height * img_width * 4);
This works fine.
But when I try to do any operation on this, I get weird output.
For example,
cv::blur(src,src,Size(5,5));
results in the expected output (blurred) but divided into 5 "columns".
Similarly, if I try
cv::blur(src,src,Size(3,3));
I get 3 such columns.
Same with other operations - Gaussian blur, erode etc
Only other operation I have tested that works fine without a problem is clone().
Can anyone hazard a guess as to why this might be happening?
I'm working on a device which does not have a proper port of OpenCV so all OS related tasks(reading and writing images) are being done by hand.