How to have 2 different appearances to Axes4 and Axes5 for SKIN DETECTION? Why Error?

1 回表示 (過去 30 日間)
% --- Executes on button press in pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
proyek=guidata(gcbf);
I=get(proyek.axes2,'Userdata');
I=get(proyek.axes3,'Userdata');
img_ycbcr = rgb2ycbcr(I);
Cb = img_ycbcr(:,:,2);
Cr = img_ycbcr(:,:,3);
img_ycbcr2 = rgb2ycbcr(J);
Cb = img_ycbcr2(:,:,2);
Cr = img_ycbcr2(:,:,3);
set(proyek.figure1,'CurrentAxes',proyek.axes4);
set(proyek.figure1,'CurrentAxes',proyek.axes5);
set(imshow(img_ycbcr));
set(imshow(img_ycbcr2));
set(proyek.axes4,'Userdata',img_ycbcr);
set(proyek.axes4,'Userdata',img_ycbcr2);
redo_Callback(hObject,eventdata, handles);
Error while evaluating uicontrol Callback Undefined function or variable 'J'. Error in SmarthomeIsyarat>pushbutton10_Callback (line 217) img_ycbcr2 = rgb2ycbcr(J); Error in gui_mainfcn (line 96) feval(varargin{:}); Error in SmarthomeIsyarat (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)SmarthomeIsyarat('pushbutton10_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback

採用された回答

B.k Sumedha
B.k Sumedha 2016 年 3 月 18 日
In your 3rd line of the code again your specifying I.
I=get(proyek.axes3,'Userdata');
I hope that needs to change to
J=get(proyek.axes3,'Userdata');
  2 件のコメント
Marquel Dwi Putranto
Marquel Dwi Putranto 2016 年 3 月 18 日
Undefined function 'redo_Callback' for input arguments of type 'struct'.
Error in SmarthomeIsyarat>pushbutton10_Callback (line 230) redo_Callback(hObject,eventdata, handles);
Error in gui_mainfcn (line 96) feval(varargin{:});
Error in SmarthomeIsyarat (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)SmarthomeIsyarat('pushbutton10_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
B.k Sumedha
B.k Sumedha 2016 年 3 月 18 日
Please post it as a new question.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by