tesserocr icon indicating copy to clipboard operation
tesserocr copied to clipboard

fix API usage examples

Open bertsky opened this issue 4 years ago • 2 comments

(sorry for the noise, shouldn't have tried to rename my branches while the PR was open – that closed them!)

revival of #260 (all comments there still apply)

bertsky avatar Jul 03 '21 00:07 bertsky

Hi @bertsky, thank you for taking the time into enhancing the API examples code.

I just want to mention that these examples were a rough translation of tesseract's own API examples. You can see, for example, tesseract's GetComponentImages example which you changed to output something different than the original.

I'd like to keep these examples faithful to the original but if you think some code is no longer relevant/needs correction then we can go ahead with these changes. Perhaps we can provide a separate document with more advanced/detailed examples?

sirfz avatar Jul 03 '21 14:07 sirfz

For what it's worth, @bertsky pointing out the inconsistency between BoundingBox and SetRectangle way of describing the coordinates has solved the segfaults I've been getting, so this piece of documentation saved my day (I expected to be able to do api.SetRectangle(it.BoundingBox(...)) which blows up in tesseract::HistogramRect)

richardhundt avatar Jul 01 '22 17:07 richardhundt