1
$\begingroup$

I'am trying to make a low pass butterworth filter for an image. I try to find a relation between dct coefficients and cutoff frequency.

I know that the low frequencies are top left side in dct, high frequencies are right down side. What is the frequency of the dct basis? The basises are sum of the cos waves but what is this basis freq. I mean can I describe this as cut off for low pass filter?

After zigzag in dct domain, I can select the coefficient that are the highest values, and I can say make the others zero lower than this coefficient. And is this coefficients frequency is the cutoff of a low pass filter. If this is true than what is that frequency corresponds to that dct2 coefficient.

Can you help me please?

  step =0.3;
            
            xmin = 26;
            xmax = 44.6;
            ymin = 35;
            ymax = 43;
            q=fix(((xmax-xmin)/step)+1);
            p=fix(((ymax-ymin)/step)+1);
          
            
            
            for a=1:p
                for b=1:q
                    
            U(a,b)=46-0.3*(ymin+(p-a+1)*step)-0.3*(xmin+(b-1)*step)+0.5*cos(1.5*(xmin+(b-1)*step)-(ymin+(p-a+1)*step));
            
                end
            end
        ux=dct2(U);
        figure,imshow(log(abs(ux)),\[\])
        colormap(gca,jet(64)),colorbar

dct coefficients

orijinal image

$\endgroup$
2
  • $\begingroup$ Please don’t double-post, pick one place to ask your question. We now have two copies of your question here because another got migrated: dsp.stackexchange.com/q/95102/33605 $\endgroup$ Commented Sep 20 at 17:26
  • $\begingroup$ I'd recommend answers be posted to the other copy and this copy be deleted. $\endgroup$
    – uhoh
    Commented Sep 21 at 3:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.