function N_features=cp_dct(x,FeatureFN,NonlinId,SmoothId,NormId,Decimation)
% CP_DCT  Comparative texture measure study: Dct features
%	N_features=cp_dct(x,FeatureFN,NonlinId,SmoothId,NormId,Decimation)

N_features=0;
h=[1 1 1; 1 0 -1; 1 -2 1]';

for fid_v=1:3
  h_v=h(:,fid_v);
  for fid_h=1:3
    h_h=h(:,fid_h)';
    if ~(fid_v==1 & fid_h==1)
      N_features=N_features+1;
      fprintf(1,'.');
      y=filter2(h_v,filter2(h_h,x));
      
      % Local energy function
      sigma_p=8.5;
      f_0=1./(2*sqrt(2)*sigma_p);
      v=cp_energy(y,NonlinId,SmoothId,NormId,f_0);
      
      % Write feature file
      catframe(v,FeatureFN,[],'Interm',Decimation);
    end
  end
end

