img_make_horizontal: Rotate object on image horizontally

View source: R/img_make_horizontal.R

img_make_horizontalR Documentation

Rotate object on image horizontally

Description

Measure the orientation angle with img_orientation(), rotate the image, then use img_centroid() to detect the centroid and flip the image so that the centroid is is the top-right quadrant. All this works with a light-on-dark image.

Usage

img_make_horizontal(x)

Arguments

x

an image, of type imager::cimg().

Examples

x <- img_read(system.file("extdata", "amphipoda/33463695.jpg",
             package="morphr"), invert=TRUE) %>% img_show()
img_make_horizontal(x) %>% img_show()

jiho/morphr documentation built on May 11, 2024, 9:32 p.m.