#load image
data(earth)
#initialize object
obj<- new("CmplxIm", img=img)
displayImg(obj@I)
#set the moment type to generalized Pseudo-Zernike
momentType(obj)<- "gpzm"
#set the order
setOrder(obj)<- 25
#set the parameter
setParams(obj)<- 1
#calculate moments of the image
Moments(obj)<- NULL
#calculate rotation invariants
Invariant(obj) =NULL;
#reconstruct the image from moments
Reconstruct(obj)<- c(20,20)
plotMoment(obj);
displayImg(obj@reconstruction);
Run the code above in your browser using DataLab