SetSourceResolution | R Documentation |
These functions allows us to specify the resolution of the image in pixels per inch and also to query the vertical resolution. This allows tesseract to more accurately estimate font size.
SetSourceResolution(api, ppi)
api |
an instance of the |
ppi |
an integer giving the number of pixels per inch in the image |
SetSourceResolution
returns NULL
and is used for its
side-effect on the tesseract object.
GetSourceYResolution
returns an integer value.
Duncan Temple Lang
https://tesseract-ocr.github.io/a01281.html
tesseract
f = system.file("images", "SMITHBURN_1952_p3.png", package = "Rtesseract")
ts = tesseract(f)
GetSourceYResolution(ts) # correctly detected at 600 ppi
SetSourceResolution(ts, 300) # but we can change this
GetSourceYResolution(ts) # 300
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.