Learn R Programming

OpenImageR (version 1.3.0)

readImage: this function reads various types of images

Description

Reads images of type .png, .jpeg, .jpg, .tiff

Usage

readImage(path, ...)

Value

the image in a matrix or array form

Arguments

path

a character string specifying the path to the saved image

...

further arguments for the readPNG, readJPEG and readTIFF functions

Details

This function takes as input a string-path and returns the image in a matrix or array form. Supported types of images are .png, .jpeg, .jpg, .tiff. Extension types similar to .tiff such as .tif, .TIFF, .TIF are also supported

Examples

Run this code

path = system.file("tmp_images", "1.png", package = "OpenImageR")

image = readImage(path)

Run the code above in your browser using DataLab