I'm taking a 640x480 video stream so for every frame I got an array Img[480,640,3].
I used black and white filter: cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) so now Img[i][j] = X, 0 <= X <= 255. Now I need to pass through every column and apply Gaussian function for its every element (making normal distribution).
I do this by iterations:
for y in range(frameWidth):
for x in range(frameHeight):
normpdf(....)
But this is reeeally slow way and I can process 1 frame each 1.5 - 2 seconds what is not suitable for real-time processing. Are there any methods to do this faster?