diff options
Diffstat (limited to 'include/image.h')
| -rw-r--r-- | include/image.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h new file mode 100644 index 0000000..ecbc255 --- /dev/null +++ b/include/image.h @@ -0,0 +1,19 @@ +#pragma once +#include <leptonica/allheaders.h> + +namespace image { +// Preprocessing configuration +static const float contrast = 0.3; +static const float sharpness = 0.7; +static const float scaleFactor = 1; +static const float grayscaleWeightRed = 0.114; +static const float grayscaleWeightGreen = 0.587; +static const float grayscaleWeightBlue = 0.299; + +Pix *loadImage(const char *imagePath); +} // namespace image + +#define INLINE_IMAGE_PROC(process) \ + temp = process; \ + pixDestroy(image); \ + *image = temp; |
