pixAddGray: Pix Operations

View source: R/leptonica.R

pixAddGrayR Documentation

Pix Operations

Description

This is one collection of functions useful for manipulating Pix-class objects.

Usage

pixAddGray(pix1, pix2, target = NULL)
pixInvert(pix, target = NULL)
pixCloseGray(pix, horiz, vert)
pixErodeGray(pix, horiz, vert)
pixConvertTo8(pix, colormap = FALSE)

Arguments

pix, pix1, pix2

a Pix-class object

target

either a Pix-class object or NULL. If a Pix is specified, this is used to store the answer. Otherwise, a new Pix is created and returned.

colormap

a logical value indicating whether to include or exclude the color map for the new image.

horiz

the width in pixels of the horizontal region for the operation

vert

the width in pixels of the vertical region for the operation

Value

These functions return a Pix-class object.

Author(s)

Duncan Temple Lang

References

http://tpgit.github.io/UnOfficialLeptDocs/

See Also

pixRead GetInputImage pixAnd

Examples

f = system.file("images", "SMITHBURN_1952_p3.png", package = "Rtesseract")
p1 = pixRead(f)
p2 = pixConvertTo8(p1)
p2 = deskew(p2)
p6 = Rtesseract:::findLines(p2, 51, 5, FALSE)
p = pixAddGray(p2, p6)
plot(p)

duncantl/Rtesseract documentation built on Sept. 8, 2024, 8:38 a.m.