473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Processing a 5x5 convolution matrix... what do I do with the edges?

I'm using a 5x5 convolution matrix to do some image processing. (I don't
really know much about image processing). I lose 2 pixels from the edges of
the image. When I apply any 5x5 matrix in photoshop however, it doesn't lose
any pixels around the edges. So I'm wondering what is usually done with the
edge pixels when using a convolution matrix???
Nov 16 '05 #1
3 9185
Not really a C# question, but here goes anyway:

1. Assume the pixels to be zero
2. Assume the pixels to be the same as the real edge pixel
3. Mirror the two 'real' edge pixels
4. Use the two pixels from the other side of the image (assume image wraps
around).
5. Don't process the pixel unless the entire matrix 'sees' real pixels.
6. Probably a whole bunch of other things to do...

There is no *right* way to do it - it depends on what your matrix is, what
your image is, and what you're trying to do.

Hilton
"MrPolite" <kd**************@msn.com> wrote in message
news:TC*****************@twister.socal.rr.com...
I'm using a 5x5 convolution matrix to do some image processing. (I don't
really know much about image processing). I lose 2 pixels from the edges of the image. When I apply any 5x5 matrix in photoshop however, it doesn't lose any pixels around the edges. So I'm wondering what is usually done with the edge pixels when using a convolution matrix???

Nov 16 '05 #2
hey thanks:) good ideas, I think I'll assume the pixels to be the same as
the edge pixel

umm, what's a good newsgroup for image processing questions?:P would you
know??

Thanks for the response
"Hilton" <ab*@xyz.com> wrote in message
news:u%****************@TK2MSFTNGP09.phx.gbl...
Not really a C# question, but here goes anyway:

1. Assume the pixels to be zero
2. Assume the pixels to be the same as the real edge pixel
3. Mirror the two 'real' edge pixels
4. Use the two pixels from the other side of the image (assume image wraps around).
5. Don't process the pixel unless the entire matrix 'sees' real pixels.
6. Probably a whole bunch of other things to do...

There is no *right* way to do it - it depends on what your matrix is, what
your image is, and what you're trying to do.

Hilton
"MrPolite" <kd**************@msn.com> wrote in message
news:TC*****************@twister.socal.rr.com...
I'm using a 5x5 convolution matrix to do some image processing. (I don't
really know much about image processing). I lose 2 pixels from the edges

of
the image. When I apply any 5x5 matrix in photoshop however, it doesn't

lose
any pixels around the edges. So I'm wondering what is usually done with

the
edge pixels when using a convolution matrix???


Nov 16 '05 #3
MrPolite wrote:
hey thanks:) good ideas, I think I'll assume the pixels to be the same as
the edge pixel

umm, what's a good newsgroup for image processing questions?:P would you
know??


No, but I'm sure there is one. I was remembering back to my Image
Processing days at University as well as when I wrote the Color Space
Library at Silicon Graphics Inc. (dmColor etc).

Hilton
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ramon M. Felciano | last post by:
Helo all -- I'm trying to gain a deeper understand for what type of semi-declarative programming can be done through XML and XPath/XSLT. I'm looking at graph processing problems as a testbed for...
1
by: SallyBenjamin | last post by:
Hello.. Can anyone help me with this coding. Basically, it needs to have add node, remove node, add edges , remove edges and display the graph But.I have only succedded to add node, add and...
3
by: PengYu.UT | last post by:
I want to define a convolution operator for two Array objects. Unfortunately, * operator has been used for Array class. +,-,/ are not good candidates for convolution. Is there any other...
2
by: yezi | last post by:
Hi: I am coding a convolution for discrete system from minus infinity to infinity, where can i get the algorith ? Thanks for any refer.
2
by: MrPolite | last post by:
I'm using a 5x5 convolution matrix to do some image processing. (I don't really know much about image processing). I lose 2 pixels from the edges of the image. When I apply any 5x5 matrix in...
6
by: Ruan Hongning | last post by:
Hi, Friends: May I know what's the fastest way to implement 1D/2D convolution? Thanks & Regards Hongning.
10
by: Enrique Cruiz | last post by:
Hello all, I am currently implementing a fairly simple algorithm. It scans a grayscale image, and computes a pixel's new value as a function of its original value. Two passes are made, first...
1
by: Wayne Shu | last post by:
Hi everyone: I'm looking forward to a wonderful matrix class library! Does someone like to introduce a to me? It should satisfy the following demands: 1. Open Source. 2. Efficient. 3. Support...
2
by: sanjeevron | last post by:
Define a class for an adjacency matrix representation of weighted, directed graphs in C++. 2. Implement the following essential methods in your class. Any input validation or exceptions must be...
0
by: brixton | last post by:
Hello, I've got the following code that creates a texture from a .RAW file: GLuint MyGLCanvas::LoadTextureRAW( const char * filename, int wrap ) { GLuint texture; int width, height; ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.