フィルターのクリア

what happened to the folowing code?

2 ビュー (過去 30 日間)
romasha
romasha 2014 年 1 月 26 日
コメント済み: romasha 2014 年 1 月 27 日
Code
% Choose default command line output for test2
handles.output = hObject;
% create an axes that spans the whole gui
ah = axes('unit', 'normalized', 'position', [0 0 1 1]);
% import the background image and show it on the axes
bg = imread('C:\Users\Romesha\Desktop\eye.jpg'); imagesc(bg);
% prevent plotting over the background and turn the axis off
set(ah,'handlevisibility','off','visible','off')
set(bg,'alphadata',.1);
% making sure the background is behind all the other uicontrols uistack(ah, 'bottom');
% Update handles structure
guidata(hObject, handles);
*Error*
>> test2
Error using set
Invalid handle
Error in test2>test2_OpeningFcn (line 63)
set(bg,'alphadata',.1);
Error in gui_mainfcn (line 221)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure),
varargin{:});
Error in test2 (line 42)
gui_mainfcn(gui_State, varargin{:});

採用された回答

Walter Roberson
Walter Roberson 2014 年 1 月 26 日
Nothing happened to it. bg is the result of imread(), which does not plot. The result of imread() is the data matrix of the image, which is not a handle. What you want to set() against is not bg but rather the result of the imagesc(bg)
  1 件のコメント
romasha
romasha 2014 年 1 月 27 日
thanx

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by