Sono confuso dai tipi di elemento OpenCV Mat. Questo è dalla documentazione:Tipi di elemento OpenCV Mat e loro dimensioni
There is a limited fixed set of primitive data types the library can operate on.
That is, array elements should have one of the following types:
8-bit unsigned integer (uchar)
8-bit signed integer (schar)
16-bit unsigned integer (ushort)
16-bit signed integer (short)
32-bit signed integer (int)
32-bit floating-point number (float)
64-bit floating-point number (double)
...
For these basic types, the following enumeration is applied:
enum { CV_8U=0, CV_8S=1, CV_16U=2, CV_16S=3, CV_32S=4, CV_32F=5, CV_64F=6 };
E 'noto che di serie C++ non definisce la dimensione dei tipi di base in byte, così come si fa usano tali presupposti? E che tipo dovrei aspettarmi, diciamo, CV_32S, è int32_t o int?
tipi in OpenCV sono abbastanza facili da capire. CV_numbitsType. Quindi CV_16S è un intero con segno di 16 bit. –
Allora perché stanno usando tali nomi per loro nei documenti (int, float, ecc.) Mentre int (ad esempio) può essere 64 bit anziché 32? – lizarisk
Non conosco la struttura sottostante ma quando hai un tappetino creato con tipo CV_32S: 'Mat myMat (10,10, CV_32S);' ti accedi con 'myMat.at (1,1) = 1; ' –
sfotiadis