Learn R Programming

pliman (version 2.1.0)

image_square: Squares an image

Description

Converts a rectangular image into a square image by expanding the rows/columns using image_expand().

Usage

image_square(img, plot = TRUE, ...)

Value

The modified Image object.

Arguments

img

An Image object.

plot

Plots the extended image? defaults to FALSE.

...

Further arguments passed on to image_expand().

Examples

Run this code
library(pliman)
img <- image_pliman("soybean_touch.jpg")
dim(img)
square <- image_square(img)
dim(square)

Run the code above in your browser using DataLab