base64 to Mat and Mat to base64
Hi,
I have very poor processing time with base64 image using C++. I don't use third library as boost...
After couple of hour to google search, I use this code to encode and decode image into base 64: http://renenyffenegger.ch/notes/devel...
My problem is my processing time is 40ms to decode image in C++, then to compare with php function my processing time is 3ms. I thought C++ were more speed !
Does really don't exist a direct entry for base64 and openCV ?
thx Christophe
honestly, you should avoid to encode images to/from base64 at all cost,apart from the compression time, it will blow up the data to a factor of 4.
opencv, being a computer-vision library does not need this at all, and there's nothing built in.
what is your actual use-case for this ?
thx for your answer, I'am working on cloud vision API. I have a global api.php that receive and process with (C++ openCV ). It's work very fast < 50ms and good.
I choose base64 because it's more easy format for beginner programmer in all language python, js, bash...
Infact last problem to have is with using base64 format with openCV
. . I am open and listen for other idea !!!!
btw, you're probably not trying to encode a cv::Mat to base64, but an already png or jpg encoded image, right ?
so, again, why ?
(only reason for base64 imho would be some 7bit protocol like e-mail (uaaa) or if you need data-encoded images (uaaaaaa))
Yes you right.
I don't need base64.
I want just a very easy way for in JS, python and JAVA to send data image to a php backend.
Problem for example is with javascript if we get data from image, it is in base64 format