Open kba opened 8 years ago
Polygons =/= Polynomials, or is there any other connection to the issue?
Second question: I don't know, but this is a good question...
Polygons =/= Polynomials, or is there any other connection to the issue?
Why polynomials :confused: :question:
Not all engines indicate their capabilities, e.g. ocrp_lang
. Searching for hocr
and poly
yields nothing either. I'm pretty sure that it is not used, I'm more looking for counter-examples.
I'm not very familiar with the tesseract code but from reading baseapi/renderer code I only see straightforward rectangles within rectangles, slanted or shifted but still bounding boxes.
I also searched for polygon-related code and saw it used in page segmentation but not serialized. Are there any plans to support bounding polygons in tesseract in the future?
From the above link:
/**
* Returns the polygon outline of the current block. The returned Pta must
* be ptaDestroy-ed after use. Note that the returned Pta lists the vertices
* of the polygon, and the last edge is the line segment between the last
* point and the first point. NULL will be returned if the iterator is
* at the end of the document or layout analysis was not used.
*/
Pta* BlockPolygon() const;
Although tesseracpageiterator.h
is not placed under the api
directory, it is part of the API.
This method is an alternative to getting a bounding box for a 'block'. None of the renderers (hOCR, PDF etc.) uses this method currently. Pta
is defined in Leptonica.
Polygons are obviously more flexible than rectangles but make the specs more complicated, e.g. #15
Are there any engines with
ocrp_poly
capability? Are there any examples in the wild?