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

β–Ά
project by
SMART_READER_LITE
LIVE PREVIEW

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): ,


slide-1
SLIDE 1

Project by Arie Kozak

slide-2
SLIDE 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 surface): 𝑆 π‘ž, π‘Ÿ =

1 π‘ž2+π‘Ÿ2+1

 The surface is assumed to be constant in one

direction.

slide-3
SLIDE 3

 Mark it using personal biological visual

system.

slide-4
SLIDE 4

 Divide the image into two connected sub-

images divided by red border.

slide-5
SLIDE 5

 Use thresholding twice: after high pass and

  • riginal image. Text found in the intersection.
slide-6
SLIDE 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.

slide-7
SLIDE 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

slide-8
SLIDE 8

𝐹𝑦𝑦 = 𝑏2 + 𝑐2 𝐹𝑧𝑧 = 𝑑2 + 𝑐2 𝐹𝑦𝑧 = 𝑏 + 𝑑 𝑐

 Solution

𝑐4 𝐹𝑧𝑧

2 βˆ’ 2𝐹𝑧𝑧𝐹𝑦𝑦 + 𝐹𝑦𝑦 2 + 4𝐹𝑦𝑧 2

+ 𝑐2 βˆ’2𝐹𝑧𝑧𝐹𝑦𝑧

2 βˆ’ 2𝐹𝑦𝑧 2𝐹𝑦𝑦 + 𝐹𝑦𝑧 4 = 0

 Only solutions with a<0,c<0 are relevant.

slide-9
SLIDE 9

 Identify β€œclusters” – areas of local

maxima/minima. All points within certain %

  • f highest intensity values.
slide-10
SLIDE 10

 Start with H = 0, perform for each cluster

separately.

slide-11
SLIDE 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.

slide-12
SLIDE 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 𝑂 (𝑐𝑗 βˆ’ 𝑏𝑗)

𝑂 𝑗

slide-13
SLIDE 13

 Find direction v, in which H is constant =>

derivative is 0. βˆ€π‘—: 𝑕𝑗 βˆ— 𝑀 = 0, 𝑕𝑗 = (π‘žπ‘—, π‘Ÿπ‘—)

 Find least square line, its directions is

perpendicular to v.

slide-14
SLIDE 14

 If v is new x-axis, calculate projection of all

points to YZ plane.

slide-15
SLIDE 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:

slide-16
SLIDE 16

 Finally, use spline, on polyline edge points.

slide-17
SLIDE 17

 Not perfect, usually works sufficiently.

slide-18
SLIDE 18
slide-19
SLIDE 19

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