0

Hello, for my assignment, I have to implement 2D Gaussian convolution using 1D Gaussian masks. I have two pgm files. I know the theory but I do not know where to start and how to deal with pixels. can anybody help me?

2
Contributors
4
Replies
6
Views
7 Years
Discussion Span
Last Post by newack
0

Hi,
If you want to achieve this without using special libraries.The way I think it should be done is by, converting the pgm files into normal text files. You should be aware of the format of pgm files. The new text file will be all the pixels of the image. Then read these numbers into matrix and apply the gaussian filter matrix. The resulting file will be converted back to pgm file.

I am saying this from experience, I have written programs for image processing but unfortunately they are in Matlab.

0

I want to use opencv for this. so do i need to convert file?

0

No, if you have a program which can read a pgm file and you can obtain each pixel of your pgm image its all good. The only thing you have to do is to get the formula for the 2d convolution and make an algorithm for it.

I would suggest after obtaining the pixel values from your pgm image, just apply 1D Gaussian formula on those values and view the result. If your 1D Gaussian filter works then convolution should be straight forward.

0

I don't understand how to obtain each pixel of your pgm image and how to treat it. i had not done image programming before.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.