MATLAB File Help: cv.imencode Index
cv.imencode

Encodes an image into a memory buffer

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

Input

Output

Options

The following format-specific save parameters are currently supported:

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

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