I wanna show all three layers of an RGB (or other color spaces) image and link them together with the original image to perform treshold operations with some spinner or slider. This is what i've tried so far:
properties (Access = private)
ax0 matlab.graphics.axis.Axes
ax1 matlab.graphics.axis.Axes
ax2 matlab.graphics.axis.Axes
ax3 matlab.graphics.axis.Axes
end
%reading image
[file,path]=uigetfile('*','Load');
filename=sprintf('%s%s',path,file);
filename = convertCharsToStrings(filename);
I = imread(filename);
%layers with max and min
I1=I(:,:,1); I1_down=min(min(I1)); I1_up=max(max(I1));
I2=I(:,:,2); I2_down=min(min(I2)); I2_up=max(max(I2));
I3=I(:,:,3); I3_down=min(min(I3)); I3_up=max(max(I3));
imshow(I,'Parent',app.UIAxes_tot); %original img
imshow(I1,[I1_down I1_up],'Parent',app.UIAxes_1); %1st layer
imshow(I2,[I2_down I2_up],'Parent',app.UIAxes_2); %2nd layer
imshow(I3,[I3_down I3_up],'Parent',app.UIAxes_3); %3rd layer
app.ax0 = axes(app.UIAxes_tot);
app.ax1 = axes(app.UIAxes_1);
app.ax2 = axes(app.UIAxes_2);
app.ax3 = axes(app.UIAxes_3);
linkaxes([app.ax0,app.ax1,app.ax2,app.ax3]);
this is the error:
Error using axes
Too many output arguments.
(line 56)
app.ax0 = axes(app.UIAxes_tot);
what is the problem?
Best Answer