I am converting an image processing code from MATLAB to Python using OpenCv(Python). My original image (our friend Lena) shown below read using the following command shows fine using imshow:
image = cv2.imread('Lena.bmp',0)
I add some Gaussian noise to the image
image_with_noise = image + 20*np.random.randn(256,256)
When I do imshow (as shown below), I don't see the image with noise as I expect.
cv2.imshow('image',image_with_noise)
cv2.waitKey(0)
cv2.destroyAllWindows()
However, the analogous MATLAB command imshow(image, [ ] ) seems to work fine.
Is there any way to understand or fix this? Your inputs are appreciated. Thank you.



image_with_noise? You probably need to convert back to uint8 to display it properly - Miki