Learn R Programming

IM (version 1.0)

checkOrder: Find the maximum order of finite moments

Description

Function to find the maximum order (and repetition for complex moments) of moments such that all moment values up to that order (in both the x and y directions) are finite and not Nan values. The maximum order will be at most the maximum order represented in the matrix of moment values. This function looks for the largest size rectangular block in the moment matrix such that no values are infinity or NaN.

Usage

checkOrder(moments)

Arguments

moments
Matrix containing image moments from order 0 up to some order p in the x-direction and q in the y-direction, or in the case of complex moments, up to order p and repetition q.

Value

orderP
The maximum order along the x-axis of the moments matrix, which is also the maximum number of valid columns minus 1.
orderQ
The maximum order along the y-axis of the moments matrix, which is also the maximum number of valid rows minus 1.

See Also

OrthIm

Examples

Run this code
data(lena);

obj= momentObj(img, "cheby", c(300,200));

maxOrder= checkOrder(obj@moments);

Run the code above in your browser using DataLab