How can i adjust brightness of a live video in image acquisition?

6 visualizaciones (últimos 30 días)
Sanjay Yadav
Sanjay Yadav el 20 de En. de 2017
Comentada: Rena Berman el 6 de Mayo de 2021
I am using the Image Acquisition Toolbox to create a simple interactive GUI that should allow the user to preview the image and dynamically adjust the brightness of the video feed.
I'm using a slider to adjust the value of brightness between(-64 to 64), code looks like this:
vid = videoinput('winvideo',1);
src = getselectedsource(vid);
preview(vid);
bri = get(handles.BrightnessSlider,'Value');
if(bri > -65 || bri < 65 )
stoppreview(vid);
src.Brightness = bri;
preview(vid);
end
Problem here is that brightness isn't changing when I move the slider, the value on slider does change.
Please help me solving this error. Thanks in advance.

Respuestas (1)

Walter Roberson
Walter Roberson el 20 de En. de 2017
MATLAB does not use {} for code blocks.
  1 comentario
Sanjay Yadav
Sanjay Yadav el 20 de En. de 2017
Thanks, I didn't notice that. But there is still a problem. Maybe in logic this time.

Iniciar sesión para comentar.

Categorías

Más información sobre Logical (Boolean) Operations en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by