Package 'magickx'

Title: Extension of the R-Package magick
Description: Image manipulation based on the magick package. It contains functions to select or remove horizontal or vertical stripes from an image. These may be used to cut off undesired areas from an image, e.g. as preparation for optical character recognition (OCR).
Authors: Hauke Sonnenberg
Maintainer: Hauke Sonnenberg <[email protected]>
License: GPL-2
Version: 0.1.0
Built: 2024-11-04 02:48:58 UTC
Source: https://github.com/hsonne/magickx

Help Index


Extract Rows and Columns from "Matrix Image"

Description

Extract Rows and Columns from "Matrix Image"

Usage

## S3 method for class 'matrix_image'
x[...]

Arguments

x

object of class "matrix_image"

...

arguments passed to extract

Value

object of class "image-magick"


Dimension of a "Matrix Image"

Description

Dimension of a "Matrix Image"

Usage

## S3 method for class 'matrix_image'
dim(x)

Arguments

x

object of class "matrix_image", as returned by image_matrix

Value

vector of two integers (number of rows, number of columns)


Extract Horizontal or Vertical Stripes from Image

Description

Extract Horizontal or Vertical Stripes from Image

Usage

extract(image, i = NULL, j = NULL, widths = NULL, heights = NULL)

Arguments

image

object of class "matrix_image"

i

row indices

j

column indices

widths

column widths in pixels

heights

row heights in pixels


Arrange Images in a Matrix

Description

Arrange Images in a Matrix

Usage

image_matrix(images, nrow = NULL, ncol = NULL, byrow = FALSE,
  dimnames = NULL)

Arguments

images

object of class "magick" representing one or more images

nrow

number of rows

ncol

number of columns

byrow

logical. Shall images be arranged along rows or along columns?

dimnames

list of vectors of row and column names, respectively


Convert List of image-magick Objects to image-magick Object

Description

Convert List of image-magick Objects to image-magick Object

Usage

list_to_magick(x)

Arguments

x

list of objects of class "image-magick"

Value

object of class "image-magick"


Try to Read Images with image_read

Description

Run image_read for each element of path. If an error occurs, continue with the next element.

Usage

try_image_read(path)

Arguments

path

passed to image_read

Value

object of class "magick-image", containing all images that could be read successfully from the paths given in path