-
-
Notifications
You must be signed in to change notification settings - Fork 33
dlib.image.image
Timur Gafarov edited this page Jan 16, 2014
·
18 revisions
Defines generalized interface of an image that abstracts from specific pixel format. It is recommended to use SuperImage when implementing new filters.
Properties:
-
uint width
- width of an image in pixels -
uint height
- height of an image in pixels -
uint channels
- number of channels per pixel -
uint bitDepth
- bits per channel -
uint pixelSize
- size of a pixel in bytes -
PixelFormat pixelFormat
- pixel format -
ubyte[] data
- raw pixel data -
auto row
- a range that represents 0..width (a row) -
auto col
- a range that represents 0..height (a column) -
float progress
- a value ranging from 0 to 1 that represents processing persentage
Methods:
-
SuperImage dup()
- create a copy of the image -
SuperImage createSameFormat(uint w, uint h)
- create an image of the same format and with specified width and height -
void updateProgress()
- make one processing step (increaseprogress
) -
void resetProgress()
- resetprogress
to 0
Operators:
-
Color4f opIndex(int x, int y)
- read a pixel with square bracket syntax (e.g.color = img[x, y]
) -
Color4f opIndexAssign(Color4f c, int x, int y)
- write a pixel with square bracket syntax (e.g.img[x, y] = color
)