could some one tell me what this returns
-------------------------------------------------------------------------
Counter = Counter + 1
If Counter = AveragePixelLoop Then Counter = 1
mdSample(PixX, PixY, 0) = 0
mdSample(PixX, PixY, Counter) = 0
For Repeat = 0 To 5
mdSample(PixX, PixY, 0) = mdSample(PixX, PixY, 0) + AveragePixel(Repeat)
mdSample(PixX, PixY, Counter) = mdSample(PixX, PixY, 0) + AveragePixel(Repeat)
Next
AverageSum = 0
For Repeat = 1 To AveragePixelLoop
AverageSum = AverageSum + mdSample(PixX, PixY, Repeat)
Next
AverageSum = AverageSum / AveragePixelLoop
-----------------------------------------------------------------------------
declaration s are as follows
Dim ColorSumStr As String 'sum of pixel color
Dim ColorRedStr As String 'red
Dim ColorGreenStr As String 'green
Dim ColorBlueStr As String 'blue
Dim ColorRedDec As Single 'red
Dim ColorGreenDec As Single 'green
Dim ColorBlueDec As Single 'blue
Dim PixX As Single 'curent pixel X
Dim PixY As Single 'curent pixel Y
Dim AveragePixel(5) As Single 'Average color from 6 pixels
Static Counter As Single 'counter
Dim AverageSum As Single 'Average sum of all colors
Dim BoxesX As Single 'how many 'detection boxes - x axis
Dim BoxesY As Single 'how many 'detection boxes - y axis
Dim AveragePixelLoop As Single 'defines how many frames does this sub compare
BoxesX = 16 'from 1 to 50
BoxesY = 16 'from 1 to 50
AveragePixelLoop = 30 'from 1 to 250
Dim Repeat As Single
Dim Px As Single, Py As Single
thanks
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).