Description Usage Arguments Value Examples
This function reads in and binarizes PNG images from the specified file path.
1 2 3 4 5 6 7 | readPNGBinary(
path,
cutoffAdjust = 0,
clean = TRUE,
crop = TRUE,
inversion = FALSE
)
|
path |
File path for image. |
cutoffAdjust |
Multiplicative adjustment to the K-means estimated binarization cutoff. |
clean |
Whether to fill in white pixels with 7 or 8 neighbors. This will help a lot when thinning – keeps from getting little white bubbles in text. |
crop |
Logical value dictating whether or not to crop the white out around the image. TRUE by default. |
inversion |
Logical value dictating whether or not to flip each pixel of binarized image. Flipping happens after binarization. FALSE by default. |
Returns image from path. 0 represents black, and 1 represents white by default.
1 2 3 4 5 6 7 | ## Not run:
csafe_document = list()
csafe_document$image = readPNGBinary("examples/Writing_csafe_single.png")
csafe_document$thin = thinImage(csafe_document$image)
csafe_processList = processHandwriting(csafe_document$thin, dim(csafe_document$image))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.