Gaussian Implementation
- From: "mcarthybn@xxxxxxxxx" <mcarthybn@xxxxxxxxx>
- Date: Thu, 9 Apr 2009 06:18:50 -0700 (PDT)
Hi ,
I am here to get some direction from you guys. Please help me to
know about this . I am trying to do a 2d[5*5] convolution by gaussian
filter. Actually i have to scale down my image from 800*600 to
640*480.I read several pages but all are saying that :
The first step is to create a kernel. A Kernel is a grid through which
you filter the color values. The inner-most pixel is called the
"destination pixel" and it receives colors from the surrounding
"source pixels"
In some example i seen that for 256*256 image the 5*5 kernel will be :
---------> int kernelInt[25] = { 1, 4, 6, 4, 1,
4, 16, 24, 16, 4,
6, 24, 36, 24, 6,
4, 16, 24, 16, 4,
1, 4, 6, 4, 1 };
--1)how they desigend this??
// define 5x5 Gaussian kernel
----------->float kernel[25] = { 1/256.0f, 4/256.0f, 6/256.0f,
4/256.0f, 1/256.0f,
4/256.0f, 16/256.0f, 24/256.0f, 16/256.0f,
4/256.0f,
6/256.0f, 24/256.0f, 36/256.0f, 24/256.0f,
6/256.0f,
4/256.0f, 16/256.0f, 24/256.0f, 16/256.0f,
4/256.0f,
1/256.0f, 4/256.0f, 6/256.0f, 4/256.0f,
1/256.0f };
2)Here in this pice of code it is divide the matrix by 1/256.
but for my image which is which 800*600 then how will i calulate this
(that floating point division).
Please let me know about this calcaulation.
Thanks in Advance
Arthur
.
- Follow-Ups:
- Re: Gaussian Implementation
- From: News Reader
- Re: Gaussian Implementation
- From: hoffmann
- Re: Gaussian Implementation
- Prev by Date: Pattern recognition sequence
- Next by Date: Re: Zooming rasters vs. vectors .
- Previous by thread: Pattern recognition sequence
- Next by thread: Re: Gaussian Implementation
- Index(es):
Relevant Pages
|
Loading