removing the dc component from the Image



Hello,

I just want to know how to remove the dc component from the image. I
am thinking in this manner
% I=imread('Image');
% dc=mean2(I);
% I1=I-dc;

is this is the correct way of removing the dc from an image??

thanks in advance,
james.

.