Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
whenever i call the recognition push button in my gui interface the error message is showing
조회 수: 1 (최근 30일)
이전 댓글 표시
CODE
% --- Executes on button press in Recognation.
function Recognation_Callback(hObject, eventdata, handles)
% hObject handle to Recognation (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
CCoeff = corr2(A,B)
if CCoeff > 0.7 % (choose a value < 1) % image 1 and image 2 are compared
msgbox('Both A and B are similar', 'MESSAGE');
else
msgbox('A and B are not similar', 'MESSAGE');
end
ERROR
Error in matching (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)matching('Recognation_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
댓글 수: 0
답변 (1개)
Geoff Hayes
2020년 5월 1일
indrani - you haven't posted the full error message but presumably it has something to do with
CCoeff = corr2(A,B)
where A and B aren't defined. How or where have these variables been set previously in your code? Consider adding them to the handles structure so that all callbacks have access to this data. See guidata for details on how you can do this.
댓글 수: 6
Geoff Hayes
2020년 5월 3일
Where would you put this call to match in your GUI? How are the inputs to this function defined?
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!