How to add gaussian noise in all channels of an image with randn? [closed]
I'm not sure if I'm doing something wrong, but I have a strange kind of "misunderstanding" with opencv function (in python) for random number generation - randn() http://docs.opencv.org/2.4/modules/co...
When I try to add gaussian noise to RGB image (adding normally distributed random numbers in "dst" matrix that has 3 channels), those random numbers get only distributed through one channel (the first one... blue). Other channels stay unchanged. I am implementing simple peace of code
cv2.randn(gauss, mean, sigma)
which with
bg, gg, rg = cv2.split(gauss)
shows that I haven't changed anything in gg and rg.
Am I doing something wrong?
show your mean and sigma (i'm already suspecting something ...)
Currently mean is 0, and sigma somwhere around 0.3... But there is no difference for R and G channels if I set mean to 0 or 255, or if I set sigma to 0.01 or 127 or whatever...