2つの部分に分割された図を示すコードを作成しました。1つ目はメイン画像を表示し、2つ目は残りの画像を表示するスライダーです。
次に、メイン部分にテキストを追加する必要があります(「ヘルプ」または「ガイド」テキストなど)。どうすればいいですか?
これは私のメインのサブコードです:
%# design GUI
numSubs = 10; % Num of sub-images.
mx = numImgs-numSubs+1;
hFig = figure('Menubar','none');
% The Main Image:
hAx = axes('Position',[0 0.3 1 0.8], 'Parent',hFig);
hMainImg = imshow(img, 'Parent',hAx);
% the slider
hPanel = uipanel('Position',[0 0.04 1 0.26], 'Parent',hFig);
uicontrol('Style','slider', 'Parent',hFig, ...
'Callback',@slider_callback, ...
'Units','normalized', 'Position',[0 0 1 0.04], ...
'Value',1, 'Min',1, 'Max',mx, 'SliderStep',[1 10]./mx);
subImg = zeros(numSubs,1);
for i=1:numSubs
%# create axis, show frame, hookup click callback
hAx = axes('Parent',hPanel, ...
'Position',[(i-1)/numSubs 0 1/numSubs 1]);
% Load img number i
name=frames(i).name;
img=imread(name,'jpg');
subImg(i) = imshow(img, 'Parent',hAx);
value = i;
set(subImg(i), 'ButtonDownFcn',{@click_callback value})
axis(hAx, 'normal')
hold off;
end
助言がありますか?前もって感謝します。