% % Written by: % -- % John L. Weatherwax 2005-08-04 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % % Epage % %----- I = [ 0, 0, 2, 2, 1, 3; 1, 1, 0, 0, 2, 2; 3, 2, 3, 3, 2, 1; 3, 2, 2, 2, 3, 2 ]; zmom_11 = Zernike_moments(I, 1,1) zmom_20 = Zernike_moments(I, 2,2) % Compute several Zernike moments A_pqs: % pArray = [ 1, 2, 2, 2 ]; qArray = [ 1, -2, 0, +2 ]; allAbsMoms = []; for ii=1:length(pArray) p = pArray(ii); q = qArray(ii); I_a = imread( '../../Data/images/petasti_fig_7_5_a.gif' ); mom_a = Zernike_moments(I_a, p,q); I_b = imread( '../../Data/images/petasti_fig_7_5_b.gif' ); mom_b = Zernike_moments(I_b, p,q); I_c = imread( '../../Data/images/petasti_fig_7_5_c.gif' ); mom_c = Zernike_moments(I_c, p,q); I_d = imread( '../../Data/images/petasti_fig_7_5_d.gif' ); mom_d = Zernike_moments(I_d, p,q); I_e = imread( '../../Data/images/petasti_fig_7_5_e.gif' ); mom_e = Zernike_moments(I_e, p,q); I_f = imread( '../../Data/images/petasti_fig_7_5_f.gif' ); mom_f = Zernike_moments(I_f, p,q); Moms = [ mom_a, mom_b, mom_c, mom_d, mom_e, mom_f ]; allAbsMoms = [ allAbsMoms; abs(Moms) ]; end allAbsMoms