#include <otImage.h>
Public Types | |
| typedef otImage::ImageType | ImageType |
| < Image data type | |
| enum | ImageType { IMG_U8, IMG_S8, IMG_U16, IMG_S16, IMG_U32, IMG_S32, IMG_U64, IMG_S64, IMG_F32, IMG_F64, IMG_RGB8 = IMG_U8 | 0x8000, IMG_RGB16 = IMG_U16 | 0x8000 } |
| < Image data type More... | |
Public Member Functions | |
| otImage () | |
| bool | create (U16 xSize, U16 ySize, U16 frames=1, ImageType type=IMG_U8) |
| bool | create (otImage &src) |
| void | close () |
| bool | blobsInit (U32 nBlobs) |
| U32 | blobSearch (U16 frame, U16 threshold) |
| void | blob (int i, rect &r) |
| void | add (U32 immediate, S32 frame=-1) |
| void | add (otImage &src, S32 frame=-1) |
| void | accum (otImage &src, U32 frame=0) |
| void | accum () |
| void | accumAverage (otImage &dst, U32 frame=0) |
| void | shrink (otImage &dst, S32 frame=-1, U32 div=0) |
| void | shrink (otImage &src, U32 min, F32 div) |
| void | sub (U32 immediate, S32 frame=-1) |
| void | sub (otImage &src, U32 immediate=0, S32 frame=-1) |
| void | set (U32 immediate, S32 frame=-1) |
| F32 | minMax (S32 frame=-1, U32 *Min=0, U32 *Max=0) |
| F32 | stats (U16 sx, U16 sy, U16 wx, U16 wy, F32 &squareSum, F32 &sum, U32 frame=0) |
| F32 | average (U16 sx, U16 sy, U16 wx, U16 wy, U32 frame=0) |
| F32 | derivative (U16 sx, U16 sy, U16 wx, U16 wy, U32 frame=0, U32 offset=1023) |
| void | derivative (U32 frame=0, U32 offset=1023) |
| void | convolution (U16 sx, U16 sy, U16 wx, U16 wy, int *kernel, otImage &out) |
| U32 | minimum () |
| U32 | maximum () |
| F32 | average () |
| U32 | frame () |
| U32 | frames () |
| U16 | width () |
| U16 | height () |
| U8 | type () |
| bool | isWordType () |
| void * | data (U32 frame=0) |
| Pixel | pixel (U16 x, U16 y, U32 frame=0) |
| void | setPixel (U16 x, U16 y, Pixel pix, U32 frame=0) |
| void | copy (otImage &src) |
| void | setGrabTime (U32 ms) |
| F32 | fps () |
| U32 | size (bool absolute=true) |
| U32 | pixels () |
|
|
|
|
|
|
|
|
Create the class |
|
|
Clear image accumulator |
|
||||||||||||
|
It performs a sum of images with the same geometric characteristics but different types. In practice it is used to create an accumulator for averages and more.
|
|
||||||||||||
|
Get the image average from the accumulator
|
|
||||||||||||
|
Add to current image another one.
|
|
||||||||||||
|
Add to the image stack, or at a single frame, an immediate value.
|
|
|
Return the average value of the image
|
|
||||||||||||||||||||||||
|
It performs average calculations on a defined area (ROI) of the image.
|
|
||||||||||||
|
Retrieve data of a detected blob
|
|
||||||||||||
|
Search blobs in the current image frame.
|
|
|
A BLOB is a contiguous information area present in an image. It does not have a specific geometric shape, but each pixel that belongs to it has a common characteristic with all those belonging to the blob. This method init the class data for a specified maximum number of detect blobs.
|
|
|
Close the class and free all allocated memory |
|
||||||||||||||||||||||||||||
|
Perform a kernel convolution with a 3x3 matrix
|
|
|
Copy an image. All stack is copied
|
|
|
Initialize the class with parameters taken from another existing class.
|
|
||||||||||||||||||||
|
Initialize the class with the specified parameters.
|
|
|
Return image data pointer
|
|
||||||||||||
|
Calculate the derivative according to the following expression: Pix(x, y) = offset + Pix(x, y, frame + 1) - Pixel(x, y, frame)
|
|
||||||||||||||||||||||||||||
|
It performs average calculations of the following expression: avg = Sum(offset + Pix(x, y, frame + 1) - Pixel(x, y, frame)) / TotalPixels
|
|
|
Return grab time as frame per second
|
|
|
Return selected frame
|
|
|
Return number of frames of the stack
|
|
|
Return vertical image pixels
|
|
|
Return true when data type is greater then a byte
|
|
|
Return the maximum value of the image
|
|
|
Return the minimum value of the image
|
|
||||||||||||||||
|
Find minimum, maximum and average of the image
|
|
||||||||||||||||
|
Read a pixel
|
|
|
Return the number of ipxels of the image
|
|
||||||||||||
|
Set all image contents to a specified value.
|
|
|
Save the grab time for the image stack
|
|
||||||||||||||||||||
|
Write a pixel
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Convert image data to another format.
|
|
|
Return the size in bytes of all stack or of a single frame.
|
|
||||||||||||||||||||||||||||||||
|
It performs some statistical calculations on a defined area (ROI) of the image.
|
|
||||||||||||||||
|
Subtract to current image another one.
|
|
||||||||||||
|
Subtract from the image stack, or at a single frame, an immediate value.
|
|
|
Return image data type
|
|
|
Return horizontal image pixels
|