Last data update: 2014.03.03

R: Calculate and display polynomials used to calculate image...
demoPolyR Documentation

Calculate and display polynomials used to calculate image moments

Description

Displays a plot of polynomials of a given order or plots of multiple orders. The polynomials are plotted over a range of pixel coordinates. Discrete and continuous orthogonal polynomials are plotted for a given order over a range of a single dimension, and complex polynomials are plotted over 2 dimensions.

Usage

demoPoly(order, type, N, params)

Arguments

order

The order of polynomials to be displayed. A single order or array of orders must be specified.

type

The type of polynomial which will be displayed.

N

The maximum dimension up to which polynomials will be calculated. The polynomials displayed will be plotted from 0 to N along the x-axis. This argument represents the dimensionality of the image for which moments would be calculated.

params

The parameters of the polynomials to be calculated. The parameters required depend on the polynomial type.

Details

For complex polynomials, (generalized Pseudo-Zernike,Fourier Chebyshev,Radial Harmonic Fourier, and Fourier Mellin), both order and repetition must be specified for each plot, for example as: (order, repetition). To plot multiple orders and repetition for all complex polynomials, the input argument would be in the form of a 2-dimensional matrix where the first column is order and the second column is the corresponding repetition.
For real polynomials, (Chebyshev, Dual Hahn, Krawtchouk, Gegenbauer, Legendre, continuous Chebyshev), each polynomials will be plotted over a single dimension of pixel coordinates for a single set of parameters and a specified range of orders. All of the polynomials in this case will be plotted in the same graph.

Value

polynomials: the displayed polynomials will be returned as a list, with each element in the list being a polynomial of a specific order. This value is only returned for real polynomials, (Chebyshev, Dual Hahn, Krawtchouk, Gegenbauer, Legendre, continuous Chebyshev).

Author(s)

Allison Irvine, Tan Dang

See Also

OrthIm, CmplxIm, MultiIm

Examples

#display chebyshev polynomials of orders 20 to 25 for dimensionality 256
demoPoly(order = 20:25,type = "cheby",N = 256)

## Not run: 
	#display generalized Pseudo-Zernike polynomials of order and repetition (3,2), (4,2), (5,3), (6,3) 
	#for pixel dimensions of 300x300, with paramater a=0
	demoPoly(rbind(c(3,2), c(4,2), c(5,3), c(6,3)), "gpzm", 300, 0);

## End(Not run)

## Not run: 
	#display Radial Fourier polynomials of order and repetition (3,2), (4,2), (5,3), (6,3)  
	#for pixel dimensions of 300x300,
	demoPoly(rbind(c(3,2), c(4,2), c(5,3), c(6,3)), "fr", 300);

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(IM)
Loading required package: png
Loading required package: jpeg
Loading required package: bmp
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/IM/demoPoly.Rd_%03d_medium.png", width=480, height=480)
> ### Name: demoPoly
> ### Title: Calculate and display polynomials used to calculate image
> ###   moments
> ### Aliases: demoPoly demoPoly-methods
> ###   demoPoly,Numbers,character,numeric-method
> ### Keywords: utilities misc
> 
> ### ** Examples
> 
> #display chebyshev polynomials of orders 20 to 25 for dimensionality 256
> demoPoly(order = 20:25,type = "cheby",N = 256)
> 
> ## Not run: 
> ##D 	#display generalized Pseudo-Zernike polynomials of order and repetition (3,2), (4,2), (5,3), (6,3) 
> ##D 	#for pixel dimensions of 300x300, with paramater a=0
> ##D 	demoPoly(rbind(c(3,2), c(4,2), c(5,3), c(6,3)), "gpzm", 300, 0);
> ## End(Not run)
> 
> ## Not run: 
> ##D 	#display Radial Fourier polynomials of order and repetition (3,2), (4,2), (5,3), (6,3)  
> ##D 	#for pixel dimensions of 300x300,
> ##D 	demoPoly(rbind(c(3,2), c(4,2), c(5,3), c(6,3)), "fr", 300);
> ## End(Not run)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>