Image capture using webcam
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Prateek
el 16 de Abr. de 2011
Editada: Walter Roberson
el 16 de Mayo de 2020
I am using matlab for capturing image using a webcam(company-Labtec) whenever i get a snapshot the image appears Red.How should i overcome this problem?
Also how can I increase the shuter exposore time of the webcam?
OS-Windows XP
3 comentarios
Chaitanya Panse
el 27 de Mayo de 2018
Editada: Chaitanya Panse
el 27 de Mayo de 2018
The problem with my GUI is that whenever i connect an external webcam and run in GUI the axis becomes very small that it is hardly seen. How do i overcome this problem? Please help.
Respuesta aceptada
David Tarkowski
el 20 de Abr. de 2011
I'm going to guess that the problem is the color space that your camera returns data in is not RGB. This is common for a lot of webcams. The commands commonly used to display images such as image or imshow expect RGB data. If you pass in YCbCr (or YUV) data, the result is an image that looks vaguely correct but has a pink and green hue to it.
There are a number of ways to work around this, but in your case, I suspect that the easiest will be to change the ReturnedColorSpace property of the videoinput object:
vid = videoinput('winvideo', 1);
set(vid, 'ReturnedColorSpace', 'RGB');
img = getsnapshot(vid);
imshow(img)
9 comentarios
Image Analyst
el 1 de Ag. de 2017
Try this:
>> ver
>> which getsnapshot
What does it say? You probably don't have the Image Acquisition Toolbox installed.
Ritika
el 3 de Feb. de 2018
How to save the snapshots during recording...can u Please help me for this
Más respuestas (5)
Mark Jones
el 25 de Abr. de 2011
Editada: John Kelly
el 13 de Nov. de 2013
Alternatively, it may be that your camera needs to warm up. To allow for this, try using manual triggering and GETSNAPSHOT.
0 comentarios
Ian
el 7 de Jul. de 2014
I got this to work, but is there a way to then read that image? Like to call it back so matlab can analyze it?
6 comentarios
Antonio Meza
el 5 de Nov. de 2015
Thank you!! it works. Finally, i can finish my project. Greetengs from Mexico
finalyear project
el 21 de Oct. de 2016
Tried to take an image using webcam by following code
vid = videoinput('winvideo', 3);
set(vid, 'ReturnedColorSpace', 'RGB');
img = getsnapshot(vid);
imshow(img)
but still got black image.Can anybody please suggest something?
1 comentario
Syed Aameer
el 1 de Feb. de 2017
attach this code above to to your code axes(handles.axes1);
hImage=image(zeros(80,120,3),'Parent',handles.axes1); preview(vid,hImage);
mohamed hushan
el 5 de Oct. de 2017
Editada: Walter Roberson
el 16 de Mayo de 2020
vid = videoinput('winvideo', 1);
set(vid, 'ReturnedColorSpace', 'RGB');
img = getsnapshot(vid); imshow(img)
after that how to save the snap images into folder?
0 comentarios
Shrey Garg
el 16 de Mayo de 2020
webcam not working in matlab
it opensup logitech webcam nut it doesnot works and displays message that application already opened
0 comentarios
Ver también
Categorías
Más información sobre Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!