22 Commits

Author SHA1 Message Date
Pierre-Yves Nicolas
c3bd144681 Snap to standard formats: A4, Letter... 2026-05-23 20:41:06 +02:00
Pierre-Yves Nicolas
9394b19731 Use focus distance to estimate physical size 2026-05-23 20:41:06 +02:00
Pierre-Yves Nicolas
27ad5efeff Improve perspective correction with camera intrinsics (#182) 2026-05-20 20:33:03 +02:00
Philipp Hasper
2b63273168 EditPage: New screen for editing an individual page 2026-05-13 18:03:57 +02:00
Pierre-Yves Nicolas
dcc797785b Change name in LICENSE_HEADER to "The FairScan authors" 2026-05-12 13:49:03 +02:00
Pierre-Yves Nicolas
c9da4f692f Improve perspective correction using projective geometry (#173) 2026-05-03 17:46:35 +02:00
Pierre-Yves Nicolas
1169bed9a5 Grayscale: avoid darkening pages with little content (#158)
Adjust black point: 0.01 -> 0.004
2026-04-21 15:39:43 +02:00
Pierre-Yves Nicolas
7d01493477 Introduce ColorMode enum 2026-04-01 12:08:07 +02:00
Pierre-Yves Nicolas
446b915d59 ImageRepository: rotations and thumbnails are not stored on disk anymore 2026-04-01 12:08:07 +02:00
Pierre-Yves Nicolas
516dd75e9c Fix grayscale PDF export: partial revert of 40314de 2026-03-25 09:06:04 +01:00
Pierre-Yves Nicolas
40314def4e Capture: reduce conversions between Mat/Bitmap/ByteArray 2026-03-24 20:34:24 +01:00
Pierre-Yves Nicolas
a9edfa2b87 Centralize JPEG compression to a single function 2026-03-22 18:09:12 +01:00
Pierre-Yves Nicolas
58abc2f3fe Improve grayscale postprocessing (#138)
Apply exp() to the Retinex output before normalization, restoring a
linear tone distribution. This improves contrast overall: light gray
content is preserved, and dark content stays dark even when the image
contains deep blacks. The previous normalization compressed all tones
toward the same gray level. Trade-off: shadows and unwanted background
variations are also more visible in some images.

Other:
- stretch toward white using histogram mode
- fall back to simple normalization on documents with large dark areas
- add bilateral denoising
2026-03-20 11:40:58 +01:00
Pierre-Yves Nicolas
c62fba87d8 Simplify code for live analysis 2026-03-08 14:53:03 +01:00
Pierre-Yves Nicolas
343495dafe New quad algorithm: identify edges from contour orientation (#130)
Goal: improve precision of automatic document cropping by switching:
- from Douglas-Peucker algorithm (OpenCV's approxPolyDP) + a heuristic for documents missing a corner
- to an algorithm that looks for edges

* New quad algorithm: identify edges from contour orientation
* Performance optimization: reduce number of calls to trigonometric functions
* Performance: use a single threshold for live analysis
* Fix orientation of debug mask and compute it only if required
* Exclude quads that go out of the frame
2026-03-07 12:09:41 +01:00
Pierre-Yves Nicolas
0456a5329f Improve processing of color documents: retinex + contrast 2026-02-11 07:29:58 +01:00
Pierre-Yves Nicolas
933f00dba6 Add missing calls to Mat.release() 2026-02-11 07:29:58 +01:00
Pierre-Yves Nicolas
f06e96d786 Update license header 2026-01-23 18:19:11 +01:00
Pierre-Yves Nicolas
5c5b6e921e New setting to control the quality of exported PDFs (#70) 2026-01-11 10:12:32 +01:00
Pierre-Yves Nicolas
fcdcea1891 Store page metadata after capture 2026-01-11 10:12:32 +01:00
pynicolas
fe91f3e241 Improve distinction between color and grayscale documents (#79)
Better differentiate color and grayscale documents:
- Look for colored pixels only in the intersection of the mask and quadrilateral
- Apply a white balance (grey world) to the document
- Exclude pixels with extreme luminance
- Erode segmentation mask
2025-12-10 17:08:21 +01:00
pynicolas
3d9d5565f1 Extract module imageprocessing (#76) 2025-12-06 08:08:20 +01:00