Learn R Programming

videoplayR (version 0.3.1)

readImg: Load image file in memory

Description

This function reads an image file and return a vpImage object that can be manipulated using the videoplayR image and video manipulation toolbox. This function supports the following image formats:
  • Windows bitmaps - *.bmp, *.dib
  • JPEG files - *.jpeg, *.jpg, *.jpe
  • Portable Network Graphics - *.png
  • Portable image format - *.pbm, *.pgm, *.ppm
  • TIFF files - *.tiff, *.tif

Usage

readImg(filename)

Arguments

filename
A character string of the path to the image file.

Value

This function returns a vpImage object.

Details

The vpImage object created by the readImg function is not a persistent object, but a pointer to a C++ object that cannot be saved for reuse in a different session.

See Also

writeImg, vpImage

Examples

Run this code
filename <- system.file("sample_img/SampleVideo_1080x720_5mb.png", package = "videoplayR")
img <- readImg(filename)
imshow(img)

Run the code above in your browser using DataLab