#include <djv_segmenter.h>
Classes | |
| struct | Params |
Static Public Member Functions | |
| static void | segment (u8 *outMaskPtr, ssize_t inMaskRowStride, MaskType inMaskType, size_t inWidth, size_t inHeight, const u8 *const inImagePtr, ssize_t inRowStride, Photometric inImagePm, const Params *inParams=NULL) |
Segmenter structure provides the function to create a mask from a picture.
| static void Celartem::DjVu::Segmenter::segment | ( | u8 * | outMaskPtr, | |
| ssize_t | inMaskRowStride, | |||
| MaskType | inMaskType, | |||
| size_t | inWidth, | |||
| size_t | inHeight, | |||
| const u8 *const | inImagePtr, | |||
| ssize_t | inRowStride, | |||
| Photometric | inImagePm, | |||
| const Params * | inParams = NULL | |||
| ) | [static] |
This function creates a mask which separates the specified image into two layers (foreground and background).
On the mask, the pixel with 0 means that the pixel should be moved to foreground and 1 does that the pixel should be moved to background.
| outMaskPtr | Pointer to a buffer on which this function writes the mask image. | |
| inMaskRowStride | The row-stride of the mask. | |
| inMaskType | The type of the mask. This should be one of MaskType enumeration. | |
| inWidth | The width of the mask and the input image. | |
| inHeight | The height of the mask and the input image. | |
| inImagePtr | Pointer to the first line of the input image. | |
| inRowStride | The row-stride of the image. | |
| inImagePm | The photometric (type) of the image. It should be one of Photometric. | |
| inParams | The parameter which configures the segmenter process. |