OpenCV imwrite saving complete black jpeg

前端 未结 3 1198
萌比男神i
萌比男神i 2021-01-04 11:26

I have done some pre processing for dft , and i am trying to save this image by imwrite.

My cropped image has this information

output.type()                


        
3条回答
  •  -上瘾入骨i
    2021-01-04 11:46

    imwrite prints on a 0 to 255 scale, but your image is in a 0 to 1 scale. To scale up, use this line:

    image.convertTo(image, CV_8UC3, 255.0); 
    

提交回复
热议问题