Converts a rectangular image into a square image by expanding the
rows/columns using image_expand()
.
Arguments
- img
An
Image
object.- plot
Plots the extended image? defaults to
FALSE
.- ...
Further arguments passed on to
image_expand()
.
Examples
library(pliman)
img <- image_pliman("soybean_touch.jpg")
dim(img)
#> [1] 825 648 3
square <- image_square(img)
dim(square)
#> [1] 825 825 3