MATLAB: Imadjust returns error only supported for 2d-grayscal images

histogramhistogram equalizationImage Processing Toolboximage segmentationimage_processing

Hi all, I am new to Matlab,
I have tried this over and over again, I am not sure what it means and it seems challenging.
Can someone pelase guide me through the imadjust command I am new to Matlab?
birds = imread('bird.jpg');
gbird = rgb2gray(birds);
bwbird = imbinarize(gbird);
%birds_imadjust = imadjust(birds);
birds_histeq = histeq(birds);
birds_adapthisteq = adapthisteq(birds);
imshow(birds);
imshow(gbird);
imshow(bwbird);
This is my code. I am not sure if I downloaded the wrong image to use with it, but this is for a professional to decompose.
I appreciate you for taking the time to respond in advance! Thank you!

Best Answer

.jpg images are almost always color images. Your code acknowledges that when it does the
gbird = rgb2gray(birds);
In your comment
%birds_imadjust = imadjust(birds);
you attempt to apply imadjust to the color image, not to the grayscale version of the image. imadjust is not designed to work on color images and gives you an error message when you try.
To be consistent with your other calls you would use imadjust(gbird)
Related Question