rgb = np.dstack((r,g,b)) # stacks 3 h x w arrays -> h x w x 3
To also convert floats 0 .. 1 to uint8 s,
rgb_uint8 = (np.dstack((r,g,b)) * 255.999) .astype(np.uint8) # right, Janna, not 256
More Related Contents:
- Saving a Numpy array as an image
- Efficiently Using Multiple Numpy Slices for Random Image Cropping
- How to convert a PIL Image into a numpy array?
- How to define a threshold value to detect only green colour objects in an image with Python OpenCV?
- How to merge a transparent png image with another image using PIL
- Python OpenCV Color Tracking
- How to get the cells of a sudoku grid with OpenCV?
- scipy: savefig without frames, axes, only content
- Convolve2d just by using Numpy
- Python OpenCV line detection to detect `X` symbol in image
- Interactive pixel information of an image in Python?
- Image comparison algorithm
- Finding red color in image using Python & OpenCV
- Detect and visualize differences between two images with OpenCV Python
- Automatic contrast and brightness adjustment of a color photo of a sheet of paper with OpenCV
- Finding connected components in a pixel-array
- Get coordinates of local maxima in 2D array above certain value
- Most efficient way to calculate radial profile
- Python – Find dominant/most common color in an image
- How to crop the internal area of a contour?
- How to resize an image with OpenCV2.0 and Python2.6
- how to remove background of images in python
- Equivalent of copyTo in Python OpenCV bindings?
- module’ object has no attribute ‘drawMatches’ opencv python
- numpy with python: convert 3d array to 2d
- FFT-based 2D convolution and correlation in Python
- Automatic White Balancing with Grayworld assumption
- Python, OpenCV: Increasing image brightness without overflowing UINT8 array
- Add padding to images to get them into the same shape
- Determine if an image exists within a larger image, and if so, find it, using Python