Re: convolution using a gaussian kernel
- From: Cliff <boiki_2002@xxxxxxxxx>
- Date: Wed, 15 Feb 2006 21:45:05 -0500
Well,it seems attacking other people is your hobby.I wont engage you
in any way but to clear a few things,
(1)I m not new to Matlab.I have written more than 50 m files in the
past year alone (yes!) but I am new in the area of image signal
processing.
(2)I dont cheat.I didnt claim I made a discovery with that code,I was
simply asking for how to change the way I was moving my window from
simple corner alignment to centred window.
(3)It is not a crime to say you I dont understand something.Infact,a
person who asks is better than one who claims to know it all and
doesnt consult with others.
It looks my crime was asking other Matlab users for their views.What
world do we live in????
I rest my case.By the way,I have managed to do that without your
help.Next time dont read my post.
Eitan Hirsch wrote:
using
it's all a matter of attitude. you are the one who's cheating and
i'm
the one who's making the world a horrible place????
had u been honest and written:
"i'm new to matlab, i got this assignment, can someone help me, and
explain to me ....."
believe me, i would be the first to answer (u can check previous
posts i've made).
anyone who has written more than 3 m files in his life can tell
this
code was not written by u.
Oh, one more thing, i dont feel i'm wasting any bits, maybe next
time
u'll learn.
eitan
Cliff wrote:
be
Why dont you save bits and stop transmitting rubbish.I d rather
silent that say what u said.It would have been better if youwant
ignored
my post rather than post such a silly reply.Its people like you
that
make the world a horrible place.Pity yourself,whoever you are!
Eitan Hirsch wrote:
i really think, that if u've written that code yourself,
u should know the answer....
Cliff wrote:
Hi,
I have a (n,n) gaussian kernel with variance sigma and
to
use
it
to convolve an image.I want to achieve this without
anyalways
alignedfollowing;built-in function.So in my implementation i have the
(i,j).In
Image=[x x x x x x x
x x x x x x x
x x x x x x x]
where size(Image)=M,N;
Say my kernel has values
win = [0.179 0.45 0.17
0.230 0.55 0.34
0.179 0.45 0.17]
My convolution code follows:
[M,N]=size(Image) %get image dim
kern = win; %gaussian kernel
[m,n] = size(kern); %size of kernel
New_Im =[];
for i=1:M-n+1 %i from 1:M-m+1 where
for j=1:N-n+1
New_Im(i,j)=0;
for k=1:n
for l=1:n
New_Im(i,j) = New_Im(i,j)+Img(i+k-1,j+l-1)*kern(k,l);
end
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Suppose I want to calculate the new pixel in location
my
implementation the old pixel (i,j) of the image is
with
point
(1,1) of the kernel.In other words pixel (i,j) is
.alignedaligned
with
the top left hand entry in the kernel.
How do I modify this code so that old pixel (i,j) is
with
the
centre of the gaussian kernel.
Many thanks
- References:
- convolution using a gaussian kernel
- From: Cliff
- Re: convolution using a gaussian kernel
- From: Eitan Hirsch
- Re: convolution using a gaussian kernel
- From: Cliff
- Re: convolution using a gaussian kernel
- From: Eitan Hirsch
- convolution using a gaussian kernel
- Prev by Date: Easy Extra Income
- Next by Date: Concatenating cell vector and double vector
- Previous by thread: Re: convolution using a gaussian kernel
- Next by thread: Re: convolution using a gaussian kernel
- Index(es):
Relevant Pages
|