Path: news.mathworks.com!not-for-mail
From: "Robbie Janssen" <r.j.m.janssen@student.tue.nl>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Image filters,Edge detectors
Date: Tue, 6 May 2008 10:01:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 39
Message-ID: <fvpa94$nac$1@fred.mathworks.com>
References: <30435824.1199857189457.JavaMail.jakarta@nitrogen.mathforum.org> <30971887.1199861291430.JavaMail.jakarta@nitrogen.mathforum.org> <fvp9cr$1ca$1@fred.mathworks.com>
Reply-To: "Robbie Janssen" <r.j.m.janssen@student.tue.nl>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210068068 23884 172.30.248.35 (6 May 2008 10:01:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 6 May 2008 10:01:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 654760
Xref: news.mathworks.com comp.soft-sys.matlab:466867


Got it, you should (at least not in my Matlab version) 
transpose the mask instead of just flipping it from left to 
right. See matlab-help for filter2

"Robbie Janssen" <r.j.m.janssen@student.tue.nl> wrote in 
message <fvp9cr$1ca$1@fred.mathworks.com>...
> I still don't get the same result Yumnam. I am using 
Matlab 
> release 7.5.0(R2007b), it should be a strange thing but 
> maybe there's where the error is? I've posted a picture 
at 
> http://www.student.tue.nl/t/r.j.m.janssen/FILTERS.jpg 
> 
> The kernel (or mask) is defined as [0 -1; 1 0] 
> 
> Can you maybe take a look at it and explain why there's 
> still a difference?
> 
> Regards,
> 
> Robbie
> 
> Yumnam Kirani Singh <kirani.singh@gmail.com> wrote in 
> message 
> 
<30971887.1199861291430.JavaMail.jakarta@nitrogen.mathforum.
> org>...
> > Sorry, I have made a mistake in the explanation of 
> filter2 and conv2. The two are equivalent under the 
> following cases.
> > >>xf=filter2(fliplr(mask),x); % using as conv2
> > >>xc=conv2(x,mask, 'same');
> > then xc and xf are the same.
> > In the other way,
> > >>xc=conv2(x,fliplr(mask), 'same'); % using as filter2
> > >>xf=filter2(mask,x);
> > here also, xc and xf will give the same result.
>