フィルターのクリア

็How to send video object in function to GUI in Matlab

3 ビュー (過去 30 日間)
Adisorn Phanukthong
Adisorn Phanukthong 2017 年 6 月 22 日
コメント済み: Geoff Hayes 2017 年 6 月 24 日
I want to send video obj use for when press start program but no data to processing and I press exit and I press start again video object OBJ has already been started. can't processing in program
then I want to know send video obj to GUI

採用された回答

Geoff Hayes
Geoff Hayes 2017 年 6 月 22 日
Adisorn - what is your order of operations? Do you launch the GUI and then call realtimefunction and pass in the handle to the GUI? Where is webcam3 defined or is this a function?
If you are trying to save the vid object to handles then you could do something like
function [] = realtimefunction(GuiHandle)
% your code
handles.vid = vid;
guidata(GuiHandle, handles);
which will update the handles structure of your GUI with the vid object. Then in your exit_Callback, you could do something like
function exit_Callback(hObject, eventdata, handles)
if isfield(handles, 'vid') && ~isempty(handles.vid)
delete(handles.vid); % or close, whatever is relevant
handles.vid = [];
guidata(hObject, handles)
end
As an aside, you should try to avoid using global variables.
  5 件のコメント
Adisorn Phanukthong
Adisorn Phanukthong 2017 年 6 月 24 日
thank you program is work good. but find Promblem in GUI Error while evaluating DestroyedObject Callback
Geoff Hayes
Geoff Hayes 2017 年 6 月 24 日
what is throwing the error? Please copy and paste the full error message and code that is generating said error.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by