cv.imencode - MATLAB File Help
cv.imencode

Encodes an image into a memory buffer

buf = cv.imencode(ext, img)
buf = cv.imencode(ext, img, 'OptionName', optionValue, ...)
[buf, success] = cv.imencode(...)

Input

Output

Options

The following format-specific save parameters are currently supported:

For advanced uses, you can directly pass a vector of parameters:

The function compresses the image and stores it in the memory buffer. See cv.imwrite for the list of supported formats and flags description.

See also