project by
play

Project by Arie Kozak Given photograph with sheet of paper with - PowerPoint PPT Presentation

Project by Arie Kozak Given photograph with sheet of paper with text only, infer shape of the surface and plot it in 3d. Single (infinite) light source from above, using reflectance map (paper is nearly Lambertian 1 surface): ,


  1. Project by Arie Kozak

  2.  Given photograph with sheet of paper with text only, infer shape of the surface and plot it in 3d.  Single (infinite) light source from above, using reflectance map (paper is nearly Lambertian 1 surface): 𝑆 π‘ž, π‘Ÿ = π‘ž 2 +π‘Ÿ 2 +1  The surface is assumed to be constant in one direction.

  3.  Mark it using personal biological visual system.

  4.  Divide the image into two connected sub- images divided by red border.

  5.  Use thresholding twice: after high pass and original image. Text found in the intersection.

  6.  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.

  7.  Maximum intensity point in image => p = q = 0. Use parabolic approximation according to B.K.P. Horn's chapter 11: 𝐼 𝑦, 𝑧 = 𝐼 0 + 0.5(𝑏𝑦 2 + 𝑐𝑦𝑧 + 𝑑𝑧 2 ) π‘ž = πœ–πΌ πœ–π‘¦ = 𝑏𝑦 + 𝑐𝑧, π‘Ÿ = πœ–πΌ πœ–π‘§ = 𝑑𝑧 + 𝑐𝑦 1 2𝐽(𝑦, 𝑧) 2 = 0.5 π‘ž 2 + π‘Ÿ 2 + 1 𝐹 𝑦, 𝑧 = = 0.5 𝑏 2 + 𝑐 2 𝑦 2 + 𝑏 + 𝑑 𝑐𝑦𝑧 + 0.5 𝑑 2 + 𝑐 2 𝑧 2 + 1

  8. 𝐹 𝑦𝑦 = 𝑏 2 + 𝑐 2 𝐹 𝑧𝑧 = 𝑑 2 + 𝑐 2 𝐹 𝑦𝑧 = 𝑏 + 𝑑 𝑐  Solution 2 βˆ’ 2𝐹 𝑧𝑧 𝐹 𝑦𝑦 + 𝐹 𝑦𝑦 2 + 4𝐹 𝑦𝑧 𝑐 4 𝐹 𝑧𝑧 2 2 βˆ’ 2𝐹 𝑦𝑧 4 = 0 + 𝑐 2 βˆ’2𝐹 𝑧𝑧 𝐹 𝑦𝑧 2 𝐹 𝑦𝑦 + 𝐹 𝑦𝑧  Only solutions with a<0,c<0 are relevant.

  9.  Identify β€œclusters” – areas of local maxima/minima. All points within certain % of highest intensity values.

  10.  Start with H = 0, perform for each cluster separately.

  11.  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.

  12.  Find relative height between A and B. If 𝑏 𝑗 , 𝑐 𝑗 is current and expected height of point i accordingly, find relative height x, such that error will be minimal: 𝑂 𝑓 𝑦 = (𝑏 𝑗 + 𝑦 βˆ’ 𝑐 𝑗 ) 2 β†’ π‘›π‘—π‘œ 𝑗 𝑂 𝑦 = 1 𝑂 (𝑐 𝑗 βˆ’ 𝑏 𝑗 ) 𝑗

  13.  Find direction v, in which H is constant => derivative is 0. βˆ€π‘—: 𝑕 𝑗 βˆ— 𝑀 = 0, 𝑕 𝑗 = (π‘ž 𝑗 , π‘Ÿ 𝑗 )  Find least square line, its directions is perpendicular to v.

  14.  If v is new x-axis, calculate projection of all points to YZ plane.

  15.  Use polyline approximation. Given number of desired points = number of clusters + 2, the desired error can be approximated using binary search.  Example – 5 points:

  16.  Finally, use spline, on polyline edge points.

  17.  Not perfect, usually works sufficiently.

  18.  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.

Recommend


More recommend