hi guys ..
i have problem in this code . it dose not work
am trying to make gaussian filter in spatial domain.
is this possible ???????
pls, any help

#Const gauss_width = True
sumr=0
sumg=0
sumb=0
Dim gauss_fact() As Integer = {1,6,15,20,15,6,1}
Dim gauss_sum As Integer = 64
For i = 1 To temp.w-2
      For j = 1 To temp.h-2
            sumr=0
            sumg=0
            sumb=0
            For k = 0 To DefineConstants.gauss_width - 1
                  color=getpixel(temp,i-((DefineConstants.gauss_width-1)>>1)+k,j)
                  r=getr32(color)
                  g=getg32(color)
                  b=getb32(color)
                  sumr+=r *gauss_fact(k)
                  sumg+=g *gauss_fact(k)
                  sumb+=b *gauss_fact(k)
            Next k
putpixel(temp1,i,j,makecol(sumr/gauss_sum,sumg/gauss_sum, sumb/gauss_sum))
      Next j
Next i
For i = 1 To temp.w-2
      For j = 1 To temp.h-2
            sumr=0
            sumg=0
            sumb=0
            For k = 0 To DefineConstants.gauss_width - 1
                  color=getpixel(temp1,i,j-((DefineConstants.gauss_width-1)>>1)+k)
                  r=getr32(color)
                  g=getg32(color)
                  b=getb32(color)

 


umr+=r *gauss_fact(k)
sumg+=g *gauss_fact(k)
sumb+=b *gauss_fact(k)
            Next k
sumr/=gauss_sum
sumg/=gauss_sum
sumb/=gauss_sum
putpixel(temp2,i,j,makecol(sumr,sumg,sumb))
      Next j
Next i




Partial Friend NotInheritable Class DefineConstants
    Public Const gauss_width As Integer = 7
End Class



  Next j

Next i

Re: image processing 80 80

Not sure what your asking help on, but I believe, based on your code structure, that this may need to be posted in the VB.Net forum.
"Moderator...?"

Re: image processing 80 80

thanks Moderator
am askin about gaussian filter do u have an idea about it ..i mean the code
how to make it

Re: image processing 80 80

This is C code. I have asked that it be moved to C...

Re: image processing 80 80

ok just forget it sir ...
i need gaussian filter in vb code
do u have it ?

Re: image processing 80 80

Try this link. We are STILL not sure what you need. What do you want to do. Do you have current VB6... code? The code above looks like C code, if you are trying to use that in vb it will not work.

Re: image processing 80 80

Another give me code request from another I'm too lazy to search myself poster.

http://letmebingthatforyou.com/?q=gaussian%20filter%20vb6

hint it's on planetsource code

commented: lol, very well said. ;) +13
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.