Create a slider in GUI?
Mostra commenti meno recenti
Hi,
I'm experimenting with GUIDE and was wondering how to create a slider that allows the user to fix the threshold value from 0 - 255 of an image.
% --- Executes on slider movement.
function slider1_Callback(hObject, eventdata, handles)
% hObject handle to slider1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of slider
global grayImage;
thresholdValue = uint8(get(handles.sldThreshold, 'Value'));
binaryImage= grayImage > thresholdValue;
axes(handles.axes2);
3 Commenti
Walter Roberson
il 6 Dic 2015
what does get(handles.slider1, 'Max') return?
kelly123
il 6 Dic 2015
Varian Adisuryo
il 28 Lug 2016
same here. I have the same eror. what should I do?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Interactive Control and Callbacks in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!