When I run this code:
>> I = imread('D:\Works\matlab\SecCode.php.png','png');
>> imshow(I);
It 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.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With