Help on reading/understanding these codes

1 次查看(过去 30 天)
Hi. can anyone explain to me the use of each function below? :) thank you:)
function [imgGray imgBinary] = Imageprocess(inputImg, T )
try
imgInfo = imfinfo(inputImg);
colorType = imgInfo.ColorType; %to know the image type
if strcmp (colorType,'truecolor') == 1 %colortype = 'truecolor'
imgGray = rgb2gray(imread(inputImg));
imgGray = imadjust(imgGray);
imgGray = adapthisteq(imgGray);
figure,imshow(imgGray);
thresh = graythresh(imgGray);
imgBinary = im2bw(imgGray, T);
figure(2),imshow(imgBinary);
end
catch

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by