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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
%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 comentarios
Respuestas (1)
SCOTT LIM
el 24 de Feb. de 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 comentarios
Ver también
Categorías
Más información sobre Image Preview and Device Configuration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!