Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imdecode() with any depth

Hi all,

OpenCV documentation specifies that I can invoke imdecode() with the same flags that we use in imread(). However, I am required to pass a Mat object to imdecode(), and this Mat object has a specific type. So, if I invoke imdecode() with IMREAD_UNCHANGED flag, will it reallocate the Mat object to have the same bit depth and number of channels as the ibput buffer? Or, will it ignore the IMREAD_UNCHANGED flag and convert the data to have the same type as the Mat object?

Thanks, Fijoy

imdecode() with any depth

Hi all,

OpenCV documentation specifies that I can invoke imdecode() with the same flags that we use in imread(). However, I am required to pass a Mat object to imdecode(), and this Mat object has a specific type. So, if I invoke imdecode() with IMREAD_UNCHANGED flag, will it reallocate the Mat object to have the same bit depth and number of channels as the ibput input buffer? Or, will it ignore the IMREAD_UNCHANGED flag and convert the data to have the same type as the Mat object?

Thanks, Fijoy