Programming Manual
PHYTEC Messtechnik GmbH 2008 L-720e_0
121
P
ro
g
ra
m
m
in
g
M
a
n
u
a
l
Y
:
In the grey scale format only the grey value, the value of
the brightness of a pixel is stored. The color information
is not considered. This format is recommended if color
is meaningless for the evaluation.
Y8
: In the Y8-format the grey value of each pixel is
stored in sequence as a value with 8-bit, so that one
Byte corresponds to one pixel.
Now the format of an image to be digitized, is exactly defined. The
Grabber must now be instructed where and how to store the data of
the image in the memory.
Therefore it is required to reserve a region in the main memory of suf-
ficient size. This is achieved by utilization of the well known
instructions for the allocation of memory (for example
malloc(...)
).
The Windows driver reserves an image memory space, in which the
image is placed.
How much memory will be used? This will be calculated from the size
of the image (number of pixels) and the required number of Bytes per
pixel (color resolution):
Memory requirements per field = hsize
.
vsize
.
pixel size [Byte]
The value
pixel size
can be depicted from
Table 7.
For the format YUV2 and BtYUV it must be considered, that 2 or
8 pixels are combined logically and that the resolution of the image is
selected correspondingly. The value calculated for the required region
of memory is valid for
one
field
(even
or
odd
). These values must be
added if a frame is required
Format
pixel size [Byte]
RGB32
4
RGB24
3
RGB16, RGB15
2
YUY2
4 Byte per 2 pixel
BtYUV
12 Byte for 8 pixel
Y8
1
Table 9:
Required Memory Space of One Pixel for the Different Modi