Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Why is the image saved by matlab with imwrite blank? And add I = uint8 (round (ca1)); You can keep it.
Why is the image saved by matlab with imwrite blank? And add I = uint8 (round (ca1)); You can keep it.
In imwrite(A, filemane), if the two possible 1)A data of image a are integers, the value is 0-255; 2) Double precision type, with the value range of 0- 1.0.

The saved image is blank, which means that A should be an integer, but it is actually a double type. If the value exceeds the specified value 1.0, it will be displayed in white.

In fact, uint8 () is to convert double into integer data of 0-255, uint8 (unsigned integer, maximum eight bits).

Or you can scale A = A/255, a to the range of 0- 1.0, and then imwrite(A, filemane), and the effect is the same.