imshow结果,大部分图像丢失

imwrite结果

## 分析问题

The function imshow displays an image in the specified window. If the window was created with the CV_WINDOW_AUTOSIZE flag, the image is shown with its original size. Otherwise, the image is scaled to fit the window. The function may scale the image, depending on its depth:
If the image is 8-bit unsigned, it is displayed as is.
If the image is 16-bit unsigned or 32-bit integer, the pixels are divided by 256. That is, the value range [0,255*256] is mapped to [0,255].
If the image is 32-bit floating-point, the pixel values are multiplied by 255. That is, the value range [0,1] is mapped to [0,255].


opencv中imshow内部的参数类型可以分为两种。（1）当输入矩阵是uint8类型的时候，此时imshow显示图像的时候，会认为输入矩阵的范围在0-255之间。（2）如果imshow的参数是double类型的时候，那么imshow会认为输入矩阵的范围在0-1。

### 解决方案

image_out  = image.astype(np.unint8)

image /=255