kolhizin / bujo

Proof of concepts and sharedlib for bujo app
0 stars 0 forks source link

Identify lines of text - Radon transform #9

Closed kolhizin closed 5 years ago

kolhizin commented 5 years ago

Test Radon transform approach to identify orientation and lines.

Algorithm:

  1. For each size factor (with step of 2^0.5) compute Radon transform and plot results for each size

  2. Select angle, where there is periodic pattern of size of line height.

  3. (optional) Calculate Radon transform of squared values to arrive to stddev of each line. Select lines with high stddev and higher mean than average.

  4. (optional) Plot distribution of Radon transform

    DoD:

    • orientation angle
    • list of lines and their sizes
kolhizin commented 5 years ago

Radon transform works like a charm! 0) Scale to low-res 1) Run Radon transform 2) Build sum(abs(delta)) and identify the most volatile direction (orthogonal to text, corresponds to lines) 3) [optional] measure similarity of different directions

kolhizin commented 5 years ago

Wiki page on results: https://github.com/kolhizin/bujo_poc/wiki/Radon-transform-to-identify-text-page-rotation