Project by Arie Kozak
Mark it using personal biological visual system.
Divide the image into two connected sub- images divided by red border.
Use thresholding twice: after high pass and original image. Text found in the intersection.
Constant albido assumption for ink, doesn’t work, use (cubic) interpolation. Smooth image with Gaussian kernel before to reduce “sharpening effect” (lateral inhibition), and also after.
Identify “clusters” – areas of local maxima/minima. All points within certain % of highest intensity values.
Start with H = 0, perform for each cluster separately.
Find closest clusters A and B; B with known height. For points in A close to B, calculate expected height according to B. Find closest points using Voronoi diagram.
If v is new x-axis, calculate projection of all points to YZ plane.
Use polyline approximation. Given number of desired points = number of clusters + 2, the desired error can be approximated using binary search. Example – 5 points:
Finally, use spline, on polyline edge points.
Not perfect, usually works sufficiently.
Detect sheet of paper automatically. Relax assumptions (light direction, H is constant in one direction). Improve clusters search. Replace/improve polyline approximation. Use this for text recognition.