Image Processing Program
Background
After I was admitted to graduate school, my advisor gave me part of an image-processing industry project as practice. The project came from an outdoor poster company.
Problems
The main requirements were:
- Generate PDFs from huge images.
- Given a polygon and a spacing value
d, generate a new polygon expanded outward by distanced.
Solutions
1. Generate PDFs from huge images
Study the PDF file format, and try either writing a PDF generation module by myself or using existing libraries such as libHaru or PDFWriter.
PDFWriter was used to implement cropping.
2. Generate an outward-offset polygon from a given polygon and spacing d
This is probably computational geometry. Since I had not studied it before, I first bought Computational Geometry: Algorithm Analysis and Design.
Edge-degeneration cases also need to be considered. References:
Polygon offset and fill algorithm
3. A GUI may be needed for user friendliness
QT / Dear ImGui / wxWidgets
Notes
DPI means Dots Per Inch.
1 inch = 2.54 cm
100 DPI = 100 Dots Per Inch = 100 / 2.54 Dots Per Cm = 39.37 Dots Per Cm
Reference Links
Compiling libharu on Windows 10
Offsetting or shrinking polygons and contours by equal distance