
Images Files and File Types 29
Data type Description Range
logical Boolean 0 or 1
int8 8-bit integer −128 — 127
uint8 8-bit unsigned integer 0 — 255
int16
16-bit integer −32768 — 32767
uint16 16-bit unsigned integer 0 — 65535
double or float Double precision real number Machine specific
TABLE 2.1: Some numeric data types
and Python uses “float.” There are others, but those listed will b e sufficient for all our work
with images. Notice that, strictly speaking,
logical is not a numeric type. However, we
shall see that some image use this particular type. These data types are also functions, and
we can convert from one type to another. For example:
MATLAB/Octav ...