Is it possible to save the image in a line instead of a file with OpenCV?
I found exactly this function in the docs:
int cvSaveImage(const char* filename, const CvArr* image)
And it can only be saved in files.
How do you want to encode an image in a string?You could just save the red, green, blue values as comma-separated strings, but encoding a binary image as something like base64 would be more compact.
Edit: if you mean the jpeq format in memory, see - OpenCV for use in memory buffers or file pointers
, char * IplImage? , , imageData, imageDataOrigin ..
imageData
imageDataOrigin
, , , .
opencv - , opencv savefile,
Source: https://habr.com/ru/post/1776037/More articles:Consequences of a policy of the same origin of JavaScript when dynamically loading images - javascriptmembership.deleteuser () returns false - asp.netЗаказ Django QuerySet на месяц/день? - djangoКак сообщить jQuery о добавленной строке строки - jqueryPHP: check which page the link is directed to - phppython: модуль не имеет атрибута mechanize - pythonC #: XNA vs. No XNA (performance) - performanceJavascript emulator - c ++Draw a triangle using CSS? - csschange in basket price - phpAll Articles