On Sun, Jan 13, 2013 at 11:01 PM, newbie <[email protected]> wrote:
> Oh, Seems Leptonica does automatically with resolution. Thanks TP again. OK.
> I think pixSetResolution should work for me. Just concern that if with
> higher DPI, then it could be slower even return the same result as 300 DPI.
> Do you think so?
I don't think leptonica makes much if any actual use of DPI, but
tesseract assumes that you have "reasonably correct" values for DPI.
For example from baseapi.h:
/**
* Set the resolution of the source image in pixels per inch so font size
* information can be calculated in results. Call this after SetImage().
*/
void SetSourceResolution(int ppi)
and from baseapi.cpp:
void TessBaseAPI::Threshold(Pix** pix) {
...
// Zero resolution messes up the algorithms, so make sure it is credible.
int y_res = thresholder_->GetScaledYResolution();
So it's best to always try to make sure the DPI is sensible. In other
words, # of pixels/DPI should result in # of inches that is close to
the actual image size.
Performance-wise, pixSetResolution has *no* effect on actual # of
pixels, and thus shouldn't effect performance. That is except in cases
where different code is run based on some DPI threshold.
--
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en