#compute chebyshev moments of an image
data(lena)
displayImg(obj@I)
obj = momentObj(I=img,type="cheby",order=c(500,500));
plotMoment(obj)
#reconstruct the image from the moments
Reconstruct(obj) = c(200,200);
displayImg(obj@reconstruction)
#calculate bivariate Legendre/Gegenbauer moments up to orders 50 and 100 with parameter 1 for Gegenbauer moments.
data(lena);
displayImg(obj@I);
obj= momentObj(img,c("legend", "gegen"),c(200, 300),NULL,2);
plotMoment(obj);
#reconstruct the image from all the moments
Reconstruct(obj) = NULL;
displayImg(obj@reconstruction);
#compute Radial Harmonic-Fourier moment invariants of a list of images, using up to order 10 and repetition 10
data(bacteria);
obj= momentObj(I=img[1:10],type="fr",order=c(10,10));
Invariant(obj) = NULL;
Run the code above in your browser using DataCamp Workspace