>> I = imread('D:\Works\matlab\SecCode.php.png','png');
>> imshow(I);
The above code always shows an all-black image. What's wrong with it?
The image I'm using is this one:
>> I = imread('D:\Works\matlab\SecCode.php.png','png');
>> imshow(I);
The above code always shows an all-black image. What's wrong with it?
The image I'm using is this one:
Ahhh, I see now. The problem is you have an indexed image and need to get the colormap argument from IMREAD as well. Try this:
[I,map] = imread('D:\Works\matlab\SecCode.php.png','png');
imshow(I,map);
A description of the different types of images in MATLAB can be found here. Here's a brief summary:
logical
array where each pixel has the value 0 or 1.