get_moment: Get an image moment

View source: R/img_moments.R

get_momentR Documentation

Get an image moment

Description

Extract an image moment from a square moments matrix using 0-based indexing.

Usage

get_moment(x, i = 0, j = 0)

gm(x, i = 0, j = 0)

Arguments

x

a moments matrix generated by of the img_moments() functions

i, j

the 0-based indexes of the matrix

Examples

x <- img_read(system.file("extdata", "plank/16199658.jpg", package="morphr"))
X_binary <- x < 1
m <- img_moments(X_binary, 3)
m
get_moment(m, 0,0)
gm(m, 0,0)

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