Why my input image is displayed as blank image by using the following code?
1 次查看(过去 30 天)
显示 更早的评论
I got a blank image as both input and output images when i process the matlab codes in the attached file. And there is no error shown in the command window. What is the reason for this and How can i solve this?
0 个评论
回答(1 个)
Spencer Chen
2017-4-4
The problem is that your converted your image to a double then applied rgb2gray. When the input is double, rgb2gray is expecting image values between 0 and 1, but your original image has values between 0 to 255 (uint8).
This conversion (to double) step is not necessary to execute rgb2gray.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!