I am trying to convert some matlab code to python and the function im2doublegives me problems. It takes an image and returns a matrix with pixels, using double characters instead of int.
I am currently manipulating my images using PIL. It has a method convertthat can take 'F'as a parameter, but all it does is convert the integer value 255to 255.0. As far as I know, it's useless.
The problem is that I am doing image manipulations, and then I have to save them. I can normalize my values so that they fall in the range 0-255, but I lose some accuracy. It is small enough that it usually does not matter, but here it does.
I tried using the "tiff" file format and it did not work. Although I can write / read, the results that I get are not correct, which I can only get at the time of converting pixels to 255, which leads to a loss of accuracy, as I said earlier. I also tried this file format 'SPIDER', which I found on Google earlier that supports PIL, although I could not open the image in the editor to check how it does it.
source
share