The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Edges between pixels
Replies: 5   Last Post: Mar 14, 2013 3:38 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Lee ZY

Posts: 26
Registered: 9/1/10
Re: Edges between pixels
Posted: Mar 13, 2013 8:47 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Shaun VanWeelden" <> wrote in message <khqmmu$fek$>...
> "Lee ZY" <> wrote in message <khppb1$5dc$>...
> > Hi,
> > I would like to generate the edges between all the pixels in an image. For instance, a 3*3 image (pixel 1 to 9), the edges = [1 2;1 3; 1 4; 1 5; 1 6; 1 7; 1 8; 1 9; 2 3; 2 4; 2 5;..;2 9;..;9 7; 9 8].
> >
> > One way i could think of is by replicating the values as follows,
> > n=3 ;
> > x=(1:3)';
> >
> > However when i tried on a relatively big image, i got this error,
> > ??? Maximum variable size allowed by the program is exceeded.
> >
> > Wondering if there is a more effective way of generating the edges. Thanks in advance!

> I would seriously question why you are doing this because I have a feeling you will find that MATLAB has MANY built in functions to do things that would generally require you to know the edges.
> That being said, I would advise you loop through each pixel in your image and get the edges for that one pixel instead of making a large list. For large images, you can very easily get lists with millions and millions of elements, which is not something you usually want.
> Also, each pixel can only have 4 edges, and 8 surrounding pixels, but never 9 so keep that in mind.

Thanks for the reply. I was just thinking instead of looking at the close neighborhood (4 or 8-connected) of each pixel that appears to be very local, maybe we can extend it to all pixels and establish the relationships between them. But now it looks like it's not practical to do so..

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.