ReImage
typedef struct ReImage_tag {
void *data;
unsigned long imgtype;
unsigned long width;
unsigned long height;
unsigned long strokecount;
unsigned long max_strokecount;
ReRect subimage;
unsigned short bitsperpixel;
unsigned short color;
unsigned short photometric;
unsigned short alignment;
unsigned short orientation;
unsigned short fillorder;
unsigned short filler;
unsigned short resunit;
unsigned long xresolution;
unsigned long yresolution;
} ReImage;
Elements:
*data
- Pointer to an image. Depending on the value of
imgtype data
points to the matrix of the
image pixels (IMGTYPE_PIXELARRAY
), the lines of the image (data[i]
to line i
with
IMGTYPE_POINTERARRAY
), or to a sequence of image pixels (IMGTYPE_STROKE
).
imgtype
- Specification of the image data under
data
in the structure ReImage
.
IMGTYPE_PIXELARRAY | Image data provided as matrix of image dots. |
IMGTYPE_POINTERARRAY | Image data provided as pointer to the beginning of the lines. |
IMGTYPE_STROKE | Image data provided as array of elements ReStroke |
| |
#define IMGTYPE_FEATURE #define IMGTYPE_FEATURE_INT #define IMGTYPE_FEATURE_UINT #define IMGTYPE_FEATURE_FLOAT | Kadmos can be used to classify feature vectors. The features can be integer, unsigned integer, or float. |
height, width
- Height and width of the image with
IMGTYPE_POINTERARRAY
and IMGTYPE_PIXELARRAY
.
strokecount
- Number of strokes width with
IMGTYPE_STROKE.
max_strokecount
- Maximum number of strokes in an image.
subimage
- Selected part of the image (
left
, top
, width
, height
).
bitsperpixel
- Specifies the size of data items for one pixel (0(=1), 1, 8, 24). For IMGTYPE_FEATURE, the value can be 8, 16, 32, or 64.
color
- Specifies the color information.
COLOR_BINARY | Black and white image. |
COLOR_GRAY | Gray image. |
COLOR_RGB | Color image. |
photometric
- Specifies the color information.
PHOTOMETRIC_MINISWHITE | Low color values for background. |
PHOTOMETRIC_MINISBLACK | Low color values for foreground (characters). |
alignment
- Byte alignment of pixel data at the beginning of a line for
IMGTYPE_PIXELARRAY
(0, 1, 2, 4).
orientation
- Storage of the image lines for
IMGTYPE_PIXELARRAY
.
ORIENTATION_TOPLEFT | The image lines are stored from the top to the bottom. |
ORIENTATION_BOTLEFT | The image lines are stored from the bottom to the top. |
fillorder
- Order of the bytes for
IMGTYPE_PIXELARRAY
and IMGTYPE_POINTERARRAY
with 1 bit per pixel.
FILLORDER_MSB2LSB | First bit = first pixel. |
FILLORDER_LSB2MSB | Last bit = first pixel. |
filler
- 8 byte alignment.
resunit
- Measure of the resolution of the scanning.
RESUNIT_NONE | No information about the scanning resolution. |
RESUNIT_INCH | Data of scanning resolution are in inch. |
RESUNIT_CENTIMETER | Data of scanning resolution are in cm. |
RESUNIT_METER | Data of scanning resolution are in meter. |
xresolution, yresolution
- Horizontal and vertical resolution of the image.
Reference: