Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Implementing gaussian blurring on color images

Status
Not open for further replies.

pravish

Newbie level 5
Joined
Feb 25, 2006
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,354
hey,
i m looking for some references or algorithms or kernels for implementing gaussian blurring on color images....in which color space can i do it best to avoid color shifting?
please help!
thanks
regards
 

Re: Gaussian blurring

Here is a code for gray level Gaussian Blurring. I have submitted last night to my Course Instructor as an assignment.

Save both functions in different files with .m format and try
glpf('cameraman.tif',15)
u can try for any gray level image placed in pwd or fully qualified path and cutoff freq of ur own choice

function glpf(image,Do);
echo off
% im = Image on which filtering is to be performed
% Do = Cutoff Frequency
im=imread(image);
[M,N]=size(im);
D=frqmesh(M,N);
H=exp(-(D.^2)./(2*(Do^2)));
F=fft2(double(im),size(H,1),size(H,2));
g=real(ifft2(H.*F));
figure(1)
imshow(im);
figure(2)
imshow(abs(g),[]);



function D=frqmesh(M,N);
rc=[0:ceil((M-1)/2) -floor((M-1)/2):-1];
U=rc'*ones(1,N);
cc=[0:ceil((N-1)/2) -floor((N-1)/2):-1];
V=(cc'*ones(1,M))';
D=V.^2+U.^2;
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top