Create an image with 5 bits for each pixel
You can rescale the value of the pixels i.e. multiply every pixel value with 32/256 (or just divide by 8) if you want to generate a mapping value on 5 bit scale for your image.
I have an image with which consists of 8 bits for each pixel, how I can create new picture that consists of 5 bits for each pixel using python and OpenCV?
I know that in an RGB image, each pixel is represented by three 8 bit numbers associated to the values for Red, Green, Blue respectively, but I can't figure it out how I can create an image from 8 bits for each pixel to a new image with 5 bits of each pixel.