Put decoded base64 data into cv::Mat variable
How to decode base64 string and put it into Mat variable. Accually i can decode it using c++ but after that i don't know how to pass it to Mat. I tried searching but didn't find any clear pointed solution(so don't mark as duplicate since there are no solution to this exact question available).
I'm using chrome native messaging and i need to load image data into cv::Mat received through the STDIN.
On client-side image is encoded using javascript dataURL.
P.S:- Please don't suggest PNACL for this since it does not serve what i exactly need.
I f you have decode your data you must have a buffer in memory so I think you can use a mat constructor like Mat::Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0)
Could you elaborate more please. with a working example. I'm trying it also but not much clear.
try to put your base64 decoded image into a vector<uchar> bytes, then
Mat m = imdecode(bytes, IMREAD_ANYCOLOR);