diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-25 22:33:03 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-25 22:42:27 +0530 |
| commit | 83e2570d3c8da9920d66a00c4bdf5650fe1b3336 (patch) | |
| tree | 5755d561acdb86422e2ce3621e217a9c05dfb640 /include/image.h | |
| parent | fb24e589290f7ffbee04972eed35fca37facdf1c (diff) | |
| download | chelleport-83e2570d3c8da9920d66a00c4bdf5650fe1b3336.tar.gz chelleport-83e2570d3c8da9920d66a00c4bdf5650fe1b3336.zip | |
Parallel ocr evaluation for sections of screen + many refactorings
Diffstat (limited to '')
| -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; |
