Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bigalex95/63d28312d633e6a7271614dce7863b8b to your computer and use it in GitHub Desktop.
Save bigalex95/63d28312d633e6a7271614dce7863b8b to your computer and use it in GitHub Desktop.
LIST OF MAT TYPE IN OPENCV

LIST OF MAT TYPE IN OPENCV

A Mapping of Type to Numbers in OpenCV

C1 C2 C3 C4
CV_8U 0 8 16 24
CV_8S 1 9 17 25
CV_16U 2 10 18 26
CV_16S 3 11 19 27
CV_32S 4 12 20 28
CV_32F 5 13 21 29
CV_64F 6 14 22 30

Unsigned 8bits uchar 0~255

IplImage: IPL_DEPTH_8U Mat: CV_8UC1, CV_8UC2, CV_8UC3, CV_8UC4

Signed 8bits char -128~127

IplImage: IPL_DEPTH_8S Mat: CV_8SC1,CV_8SC2,CV_8SC3,CV_8SC4

Unsigned 16bits ushort 0~65535

IplImage: IPL_DEPTH_16U Mat: CV_16UC1,CV_16UC2,CV_16UC3,CV_16UC4

Signed 16bits short -32768~32767

IplImage: IPL_DEPTH_16S Mat: CV_16SC1,CV_16SC2,CV_16SC3,CV_16SC4

Signed 32bits int -2147483648~2147483647

IplImage: IPL_DEPTH_32S Mat: CV_32SC1,CV_32SC2,CV_32SC3,CV_32SC4

Float 32bits float -1.1810-38~3.4010-38

IplImage: IPL_DEPTH_32F Mat: CV_32FC1,CV_32FC2,CV_32FC3,CV_32FC4

Double 64bits double

Mat: CV_64FC1,CV_64FC2,CV_64FC3,CV_64FC4

Unsigned 1bit bool

IplImage: IPL_DEPTH_1U

Type accessors for the memory model The Emscripten memory representation uses a typed array buffer (ArrayBuffer) to represent memory, with different views into it giving access to the different types. The views for accessing different types of memory are listed below.

HEAP8 View for 8-bit signed memory.

HEAP16 View for 16-bit signed memory.

HEAP32 View for 32-bit signed memory.

HEAPU8 View for 8-bit unsigned memory.

HEAPU16 View for 16-bit unsigned memory.

HEAPU32 View for 32-bit unsigned memory.

HEAPF32 View for 32-bit float memory.

HEAPF64 View for 64-bit float memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment