Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
3x3 pixel neighborhood window

Subject: 3x3 pixel neighborhood window

From: Twilighter

Date: 9 Jul, 2011 10:55:10

Message: 1 of 7

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

Subject: 3x3 pixel neighborhood window

From: Twilighter

Date: 9 Jul, 2011 15:14:10

Message: 2 of 7

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

Subject: 3x3 pixel neighborhood window

From: Greg Heath

Date: 9 Jul, 2011 20:36:24

Message: 3 of 7

On Jul 9, 11:14 am, "Twilighter " <mscmat...@gmail.com> wrote:
> i figured out how to fix this
>
> thank you anyway :)
>
>
>
> "Twilighter " <mscmat...@gmail.com> wrote in message <iv9c2d$e8...@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- Hide quoted text -
>
> - Show quoted text -

Question:

What do you call a selfish person who

1. Top-posts
2. Asks thousands of readers a question, then
pronounces that he has figured out the answer
without sharing it with those readers.

Greg

Subject: 3x3 pixel neighborhood window

From: Twilighter

Date: 9 Jul, 2011 20:53:09

Message: 4 of 7

sorry Greg ...
but i believe selfishness would be that i keep my question to take up someone's else time ... while i have already figured it out ... that would be called selfishness?!!!

i have left many questions none looked for it or ansered it, maybe none is interested ...
regardless this fact i still did care to tell thank u , and save ur time for someone needs ur help
and when i get a reply i get this
thank you for being so nice

Subject: 3x3 pixel neighborhood window

From: Twilighter

Date: 9 Jul, 2011 20:56:09

Message: 5 of 7

sorry Greg ...
but i believe selfishness would be that i keep my question to take up someone's else time ... while i have already figured it out ... that would be called selfishness?!!!

i have left many questions none looked for it or ansered it, maybe none is interested ...
regardless this fact i still did care to tell thank u , and save ur time for someone needs ur help
and when i get a reply i get this! if u r interested to know how i solved it
u would simply ask how, and i would gladly answer it ... instead of calling me this

i dont think ppl here works to certain rules, it's a free world!!!

thank you for being so nice

Subject: 3x3 pixel neighborhood window

From: José Ignacio Orlando

Date: 13 Apr, 2013 20:07:10

Message: 6 of 7

Hi!

I'm having the same problem. How did you solve it?

Subject: 3x3 pixel neighborhood window

From: Anand g

Date: 24 Oct, 2014 13:17:11

Message: 7 of 7

"José Ignacio Orlando" <ignaciorlando@gmail.com> wrote in message <kkcdte$rsg$1@newscl01ah.mathworks.com>...
> Hi!
>
> I'm having the same problem. How did you solve it?
Hi,
 Try this link
http://www.mathworks.com/matlabcentral/fileexchange/48239-cover-window--inp-img-w--

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us