feat: Add document scanner package

This commit is contained in:
Anton Stubenbord
2023-02-22 18:17:50 +01:00
parent a8a41b38a8
commit 9c5a45f329
105 changed files with 3998 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
#include <iostream>
struct Coordinate
{
double x;
double y;
};
struct DetectionResult
{
Coordinate *topLeft;
Coordinate *topRight;
Coordinate *bottomLeft;
Coordinate *bottomRight;
};
extern "C" struct ProcessingInput
{
char *path;
DetectionResult detectionResult;
};
extern "C" struct DetectionResult *detect_edges_from_file(char *str);
extern "C" struct DetectionResult *detect_edges(uint8_t *bytes, int byteCount);
extern "C" uint8_t *process_image(
uint8_t *bytes,
int byteCount,
double topLeftX,
double topLeftY,
double topRightX,
double topRightY,
double bottomLeftX,
double bottomLeftY,
double bottomRightX,
double bottomRightY);
extern "C" bool process_image_from_file(
char *path,
double topLeftX,
double topLeftY,
double topRightX,
double topRightY,
double bottomLeftX,
double bottomLeftY,
double bottomRightX,
double bottomRightY);