sc_reduce: sc_reduce

Description Usage Arguments Value Examples

View source: R/sc_reduce.R

Description

Removes least energy vertical and/or horizontal pixel seams to reduce the size of a given image with respect to its contents.

Usage

1
sc_reduce(imgPath, ncols = 0, nrows = 0)

Arguments

imgPath

Path to a RGB image. (.PNG / .JPG / .TIF)

ncols

Number by which the width has to be decreased

nrows

Number by which the height has to be decreased

Value

SC-Image <Resized Image>

Examples

1
2
3
4
5
library(EBImage)
filePath <- system.file("images", "sample-color.png", package="EBImage")
reducedImage <- sc_reduce(filePath, ncols = 1, nrows = 1)
display(reducedImage$img_reduced)
class(reducedImage)

vgorte/R-Seam-Carving documentation built on Aug. 5, 2019, 12:15 p.m.