Я хочу узнать о теории фона приложения цветных порогов на вкладке Matlab apps. Потому что я объясняю теорию на моем семинаре. Это приложение является автоматическим инструментом и генерирует автоматический код. Так что мне неудобно, если я не знаю теорию. Я должен знать эту теорию.
% Auto-generated by colorThresholder app on 14-May-2019
%------------------------------------------------------
% Convert RGB image to chosen color space
RGB = im2double(RGB);
cform = makecform('srgb2lab', 'AdaptedWhitePoint',
whitepoint('D65'));
I = applycform(RGB,cform);
% Define thresholds for channel 1 based on histogram settings
channel1Min = 0.058;
channel1Max = 99.617;
% Define thresholds for channel 2 based on histogram settings
channel2Min = -4.652;
channel2Max = 14.601;
% Define thresholds for channel 3 based on histogram settings
channel3Min = 4.440;
channel3Max = 43.442;
% Create mask based on chosen histogram thresholds
BW = (I(:,:,1) >= channel1Min ) & (I(:,:,1) <= channel1Max) & ...
(I(:,:,2) >= channel2Min ) & (I(:,:,2) <= channel2Max) & ...
(I(:,:,3) >= channel3Min ) & (I(:,:,3) <= channel3Max);
% Initialize output masked image based on input image.
maskedRGBImage = RGB;
% Set background pixels where BW is false to zero.
maskedRGBImage(repmat(~BW,[1 1 3])) = 0;