in reply to Re: Converting tesseract box data into 2d grid
in thread Converting tesseract box data into 2d grid
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Converting tesseract box data into 2d grid
by BrowserUk (Patriarch) on Jan 29, 2015 at 01:27 UTC | |
'm guessing the magic numbers can be found by averaging the dimensions from all the bounding boxes. Actually no. I tried that; but the average x-dimension comes out at 8.5882352941176470588235294117647; which was no good at all. I'm afraid I cheated a little. The Y dimension was obvious as all the Ys come out as 12. For the X, I inspected the data and guessed at 10, but that put to many extra spaces in:
So then I tried 11 but it still put one extra in the middle row:
So then I tried 10.5 and voilą! I also tried dividing the overall width of the longest line by the number of chars: 327-18 / 13 = 23.769... And just now I tried taking the differences of all the x1s in the longest row:
Then averaging those: 27+ 25+ 25+ 24+ 27+ 22+ 28+ 22+ 26+ 25+ 26+ 25 = 302 / 12 = 25.166666666666666666666666666667 An' wadda ya know. It works perfectly! With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
| [reply] [d/l] [select] |