I'm making application for image recognition using grayscale image format. the problem is how to get the values from the gray image.
I have a sample program but I might not be able to use this code to VB.net, because the code for vb.6. Can someone convert this code to vb.net?or do you have another solution?
I was more expecting another solution to this problem in VB.net code.
thank you very much
Code:For Y = 1 to Picture1.scaleheight For x = 1 to Picture1.ScaleWidht p = Get pixel (picture1.hdc, X,Y) r= p and &HFF g = (p\&H100)and &HFF b = (p\&H10000)and &HFF grtotr=grtotr + r grratr = Round(gtotr/(picture1.ScaleHeight*Picture1.Scalewidht),2) grtotg=grtotg + g grratg = Round(gtotg/(picture1.ScaleHeight*Picture1.Scalewidht),2) grtotb=grtotb + b grratb = Round(gtotb/(picture1.ScaleHeight*Picture1.Scalewidht),2) Next Next Text1.text = grratr Text2.text = ggratg Text3.text = ggratb




Reply With Quote