I want to adjust the brightness of an image using slider.What can I do to make the slider start at middle position. What function should I use to make the image brighter if slider moved to the right and darker to the left?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
%this is my current slider callback
axes(handles.axes2);
hChildAxes2 = get(handles.axes2,'Children');
a=get(hChildAxes2(1),'CData');
b=get(hObject,'Value');
c=imadd(a,b);
imshow(c);
0 Kommentare
Antworten (1)
SCOTT LIM
am 24 Feb. 2017
In the GUIDE builder there is a slider icon. You can adjust the settings of the slider when you double click on the slider. You can change: 'Value' which is the starting position. 'Max' ' Min' which are your boundaries.
Im = imread('mypic.jpg');
offset = get(hObject,'Value');
Im = Im + offset ; %but u have to change the offset values to the correct data type as Im. e.g. uint8 or uint16(offset)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Preview and Device Configuration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!