I am trying to compress and reconstruct an image but facing problems with the data type of the compressed image pixel values which are of float64 and therefore, when I am trying to retrieve the pixel values from the compressed image , reconstruction is poor because on reading the pixel values corresponding to compressed image, the pixel value array elements are converted to uint8 type, thus leading to loss in the pixel data on automatic conversion from float to uint8. I want to take dwt of the image, store the dwt coefficients as an image (as images are of the lesser size as compared to pixel values stored in a file), and then retrieve the pixel values from the coefficient images, and thus reconstructing the image on taking inverse wavelet of the coefficients arrray obtained on reading the coefficient array. I am implementing the complete system in OpenCV python.
Asked
Active
Viewed 134 times
0
float64data type has different range than the usualuint8triplet you would expect, or something else (?) – A_A Jun 22 '18 at 16:18float64has an enormous range,uint8's range is 0-255. The possible reason why you don't "see" something that resembles an image is because you are not handling the conversion properly. The rest of the description of why an image might be smaller (?) is also unclear. Are you following specific publications outlining what you are trying to implement? – A_A Jun 23 '18 at 21:08