Path: news.mathworks.com!not-for-mail
From: "Twilighter " <mscmatlab@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: 3x3 pixel neighborhood  window
Date: Sat, 9 Jul 2011 15:14:10 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 30
Message-ID: <iv9r82$jd6$1@newscl01ah.mathworks.com>
References: <iv9c2d$e8j$1@newscl01ah.mathworks.com>
Reply-To: "Twilighter " <mscmatlab@gmail.com>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1310224450 19878 172.30.248.35 (9 Jul 2011 15:14:10 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 9 Jul 2011 15:14:10 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2591832
Xref: news.mathworks.com comp.soft-sys.matlab:735667

i figured out how to fix this

thank you anyway :)

"Twilighter " <mscmatlab@gmail.com> wrote in message <iv9c2d$e8j$1@newscl01ah.mathworks.com>...
> Hi
> 
> i have a 64x64 image and
> 
> i need to make a window of [3 3] for every pixel in my image
> so i will apply some certain algorithm on them later ....
> 
>  something like that 
> 
> I1 = unit8(floor(conflict(I, [3 3], 'slideing', mean)))
> 
> the resultant I1 is 64x64 matrix which corresponds to the mean of the center pixel by mean of its neighboring pixels
> 
> i need the [3 3] neighboring pixels of each  pixel in the image but without applying any function on it ...
> 
> so i tried this function
> 
> I2 = im2col(I, [3 3], 'sliding');
> 
> what i got is a 9x3844
> i thought it will be 9x4096
> 
> as the total number of pixels are 4096 & each column corresponds to each pixel 3x3 window
> 
> so how can i get the 3x3 neighborhood window for each pixel in an image