Image capture using Webcam in Matlab
Posted by Ib / Vce(sat) on March 23, 2007
Have you ever wanted to process your image and then do some processing and then move your robot?
well this can be easily done through MATLAB. Get Matlab 7.You must check if you have the data acquisition toolbox in your version. that you have installed.
TO FIND IF YOU HAVE DATA ACQUISITION
Just get to the Matlab Start menu

That shows that the toolbox exixts.
Want more?
Type “imaqhinfo” in command window to see this

Notice that the adaptor is ‘Winvideo’
Any webcam you connect is accessed through this adaptor. Now the main part
1)Connect your webcam to the computer through the USB.
vid = videoinput(‘winvideo’, 1, ‘RGB24_320×240′);
Specify the adaptor name and resolution
2) Open Preview window to view video at runtime
preview(vid);
This will open a window similar to yahoo messenger Webcam interface. And you will be able to view the video demo the webcam at runtime
3) Capture
data = getsnapshot(vid);
This command will store the image of that instant into the variable data in a matrix of 320X240.
That’s it , now that you have the image of what your robot is looking at or probably the desired object, you may carry on processing and provide proper control signals to your Parallel Ports . If You are new to parallel ports read here.
comment your thoughts, don’t keep them to yourself!!!
Madan – Your host
Rob Purser said
Thanks for talking about Image Acquisition Toolbox!
You talk about checking if Data Acquisition Toolbox is installed, but the functionality that you’re discussing is part of the Image Acquisition Toolbox. You should check to see if “Image Acquisition Toolbox” shows up in the list of installed products on the Start/Toolboxes menu item. You can see it in the snapshot you provide.
All the best,
-Rob Purser
madan said
yogendra said
How to get a particular frame for processing…
Ib / Vce(sat) said
well here we are not capturing a video and extracting image but we are capturing a single snap at runtime. are u asking about how to extract a single image from a already recorded video stream?
ahmed essawy said
thanks , man .
useful information .
arun said
thank u ….
trietnguyen said
Pls, help !!!
My problem is: “I have plugged my WC to my PC, installed its driver, and it worked well. But when i typed “imaqhwinfo(‘winvideo’)” in command windows, i got responses as below:
>> info = imaqhwinfo('winvideo')
info =
AdaptorDllName: [1x81 char]
AdaptorDllVersion: '1.10 (R2006a)'
AdaptorName: 'winvideo'
DeviceIDs: {1x0 cell}
DeviceInfo: [1x0 struct]
–> What’s my DeviceIDs?
>> vid = videoinput('winvideo', 1,'RGB24_320×240');??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
I can’t specify the adaptor name and resolution. Please help!!!
madan said
@trietnguyen
Are you able to ust execute this command?
vid = videoinput(‘winvideo’)
trietnguyen said
Thank you for your replying.
Yes, I am. And the response is :
>> vid = videoinput(’winvideo’)
??? vid = videoinput(’winvideo’)
|
Error: The input character is not valid in MATLAB statements or expressions.
Thank you again...
trietnguyen said
Hura!!! I did it. After typing “imaqreset” command, everything correct!!!
Cheer, thank you madan, thank you!!!
madan said
@trietnguyen
Thanks for informing the change. Lot of people care least to do so.. Thanks once again.
Christian said
Hi.. I’m working in image proccessing. I want to work with sequences or videos. Can I record a video with a Web Cam in Matlab.
Thank you in advance,
Christian
madan said
@christian
Download this file and add it to your library and try it
check out here
sixaxis said
I also faced the same problem as trietnguyen.
The webcam installed is not recognized by the imaqfind command.
But what does the imaqreset command do actually?
Osama Nasir said
Can u please tell me that this code will work with camera connecting to computer via bluetooth? and how it can b interfaced via bluetooth
Thanx
Norain said
thank you man very much it is realy usefull
Parisa said
Hi,
when I enter the ‘imaqhwinfo’ command I get almost the same result as yours. but I can not run ‘preview(vid)’ command. it gives me this error: “??Undefined function or variable ‘vid’”
Thanks for your help,
chongwan said
Hi,
Im a final year students and is doing my fyp project on stereo vision based tracking. The acquisition part will be a little bit headache for me coz im dealing with image acquisition using 2 cameras. I was wondering whether the function u given above can deal with image acqusition from two different web cameras at the same time. I have tried the image acquisition with vcapg but output video image is a little bit lag which is about 1 to 1.5 frame per second. Hope that you will help me with this.. thanks in advance…
Regards,
chongwan
ankur jain said
hi
i m a final yr student and i need to use this code for my camera installed on a remote controlled car………..can u tell me how many frames per second we can get as speed of car will be adjusted according to it.
secondly, i need to know whether this functionality is their in matlab 6.1
Tarang said
Hi,
Any idea where the snap shot is stored in the matlab once it has been taken so that one can recall if required
madan said
the variable that u assign it to is where it is stored. u may decide to save that value for suture use too.
arda said
hi!
first all I must say that it is very useful..Thank you..
but i have a question ; i want to take snapshots in every 3seconds automatically by using MATLAB.how can i do that?
thank you!
arda
madan said
use a delay function, call it inside the for loop. You can get delay.m online if yoiu search for it
arda said
thanks for your help i ‘ll try it..
rax said
the following happens if i type in the command below.
>> info = imaqhwinfo(‘winvideo’)
info =
AdaptorDllName: ‘D:\toolbox\imaq\imaqadaptors\win32\mwwinvideoimaq.dll’
AdaptorDllVersion: ‘2.1 (R2007a)’
AdaptorName: ‘winvideo’
DeviceIDs: {1×0 cell}
DeviceInfo: [1x0 struct]
and again,when i type the following command
>> vid = videoinput(‘winvideo’, 1, ‘RGB24_320×240′);
??? Error using ==> videoinput.videoinput at 233
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
please help me out here
vk said
in my project i hav to track the movement of my hand and move the cursor according to the hand movement i am able to track the movement of hand using matlab but how to pass this coordinates to the cursor and move it accordingly…………………….?
Manoj said
Hello Madan
can u help me out plzzz
i got stuck in a situation where i need to find where my snap shot is stored in the matlab once it has been taken so that one can recall if required. this is the summary thats in my command window..
>> preview(vid);
>> data = getsnapshot(vid);
>> vid = videoinput(‘winvideo’)
Summary of Video Input Object Using ‘PC CAMERA DATA SOURCE(6029)1.0(32-32)’.
Acquisition Source(s): input1 is available.
Acquisition Parameters: ‘input1′ is the current selected source.
10 frames per trigger using the selected source.
‘RGB24_352×288′ video data to be logged upon START.
Grabbing first of every 1 frame(s).
Log data to ‘memory’ on trigger.
Trigger Parameters: 1 ‘immediate’ trigger(s) on START.
Status: Waiting for START.
0 frames acquired since starting.
0 frames available for GETDATA.
kindly help me pass through this situation plz
thnx n regards
madan said
>> preview(vid);
>> vid = videoinput(’winvideo’)
>> data = getsnapshot(vid);
>> save data
This will give save the picture for you
adeel said
but where it stores, imean folder
rply sharp
suley said
im a final year student and i’m using stereo to find distance of obstacle..i’ve capture all the image required but having prob in developing the code for my stereos to find the distance..can u help me..plz..
ansh said
Hii
I got this msg while trying
>> info = imaqhwinfo(‘winvideo’)
info =
AdaptorDllName: ‘Z:\matlab_7.1\toolbox\imaq\imaqadaptors\win32\mwwinvideoimaq.dll’
AdaptorDllVersion: ‘1.9 (R14SP3)’
AdaptorName: ‘winvideo’
DeviceIDs: {1×0 cell}
DeviceInfo: [1x0 struct]
and when i type following command i get :
vid = videoinput(‘winvideo’,1, ‘RGB24_320×240′);
??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
I tried : vid = videoinput(‘winvideo’) but got
??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
I also tried imaqreset and after doing even that i got the same errors.
please help!!!
Alireza said
I need one article about line follower robots with image processing
that wrote with matlab7
thank you very much
I wait for u
sadha said
Hii
I got this msg while trying
>> info = imaqhwinfo(’winvideo’)
info =
AdaptorDllName: ‘c:\matlab_7.2\toolbox\imaq\imaqadaptors\win32\mwwinvideoimaq.dll’
AdaptorDllVersion: ‘1.9 (R14SP3)’
AdaptorName: ‘winvideo’
DeviceIDs: {1×0 cell}
DeviceInfo: [1×0 struct]
and when i type following command i get :
vid = videoinput(’winvideo’,1, ‘RGB24_320×240′);
??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
I tried : vid = videoinput(’winvideo’) but got
??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
I also tried imaqreset and after doing even that i got the same errors.
please help!!!
Mike said
Can I capture an image from a webcam using an m file that has been converted to an executeable file?
feddy said
can i capture images using the camera of W810i sony erricson mobile phone using matlab7??
i ve already installed PC suite that came with mobile phone and tried myself but got the following responses:
>> imaqhwinfo
ans =
InstalledAdaptors: {’winvideo’}
MATLABVersion: ‘7.0 (R14)’
ToolboxName: ‘Image Acquisition Toolbox’
ToolboxVersion: ‘1.5 (R14)’
>> vid = videoinput(’winvideo’,1);
??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
Plz help me out.
Thanking u in anticipation.
feddy
Advance said
Is the robot able to transfer to PHP?
Feddy said
Kindly do help me in interfacing mobile phone(W810i)with matlab7 for capturing images!!!!
Feddy said
Hello Madan!
Can u plz hepl me out?
mohammad said
I got this msg while trying
>> info = imaqhwinfo(’winvideo’)
info =
AdaptorDllName: ‘c:\matlab_7.2\toolbox\imaq\imaqadaptors\win32\mwwinvideoimaq.dll’
AdaptorDllVersion: ‘1.9 (R14SP3)’
AdaptorName: ‘winvideo’
DeviceIDs: {1×0 cell}
DeviceInfo: [1×0 struct]
and when i type following command i get :
vid = videoinput(’winvideo’,1, ‘RGB24_320×240′);
??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO
please help me. what is cuse of “device id is 0 or empty” and who can transverse it to 1?
tanks
pls send rasponse for mail
rosma said
i’ve use logitech webcam RGB24_352×288 resolution for matlab, but the image cannot exist. what the suitable webcam that i have to use?
thanks
pls send respond to mail
Sutharshan said
hey guys i think
the code [1x0] that you get in device id says that the webcam driver is present but the hardware is not detected.Check it.
hope this helps.
rakesh said
1. how will we see images using mat-lab?
2. which one is more complex in between dct and fft?which is more effective in those both?
3. will the compression-rate increase or decrease using hadamard transform?If so,how much will it increase or decrease?
Anne said
After i run the code, there r some errors occur, it says for the function image, the results must be positive integer or logical. Plz reply cos i dunno wat to do..thanks..
anupriya said
thnx……..
krishan said
hi,
i am making project on directing robot/motor using matlab by capturing the images through webcam. i have read ur article regarding it, but i was unable to see its pics. please send all info about it.
thank u 4 everything u provided, it is a good effort.
Anoop said
hi,
I am doing my final year project in object tracking using pan and tilt.I have got the acquisition part and filtered image and converted the image to binary.I have got the image as such.Could u please help in obtaining the centroid of image and the pixel location of that image so that I should transmit it to the servo controller
Thanking you in advance
rahul said
friends ur most of the problems of image processing is with u present in ur setup cd
move to ur cd and find help folder in that find folder containing pdf in its name then go in there in folder naming image u will thav full tutorial of image processing
note u may not find this in the help folder of ur installed softwares
u will find in help folder much more things
chaitanya said
friends i am working on project hand gesticulation recognition. can any body tell me how can i track hand using matlab in video.thankyou…
mk said
would the command works for usb webcam and file wmv video file
amit said
imaqhwinfo(‘winvideo’)
??? Undefined function or variable ‘imaqhwinfo’.
>> vid = videoinput(‘winvideo’)
??? Undefined function or variable ‘videoinput’.
please reply soon what to do for this problem
as i have connected webcam,also installed its driver & it is also showing the video but matlab is detecting it
behnam said
hello
i want to know how webcam interface with matlab?
thx
kyle said
Hello. I have a question for you.
I am importing an image in to matlab from a USB webcam via
the image acq. toolbox. The image is fed into a while loop,
processed, and information from the image is converted into
a command for a device that is sent via rs-232. The problem
I am having is that the device does not respond until after
the 3-5 frame has been processed even though the device
receives a command and acknowledges that command after the
first iteration of the loop. It will run fine as long as it
is not waiting on matlab to acquire images (meaning if i tell
it to run while acquiring a vid object, but when I import an
image in, there is a delay). Any ideas as to
why this is happening would be greatly appreciated since it is
holding up my thesis.
Thanks
Muhammad Irfan said
Hi
My name is Irfan Now days i m working our final year project i want to compare this save images to another save image Sir please guide me
silivis said
i am making project on directing robot
matlab should receive data from usb pot in online form.i read all of this page but i cant do this project.please help me.
alok said
thanks……………….
baishali said
got this msg while trying
>> info = imaqhwinfo(’winvideo’)
info =
AdaptorDllName: ‘c:\matlab_7.2\toolbox\imaq\imaqadaptors\win32\mwwinvideoimaq.dll’
AdaptorDllVersion: ‘1.9 (R14SP3)’
AdaptorName: ‘winvideo’
DeviceIDs: {1×0 cell}
DeviceInfo: [1×0 struct]
and when i type following command i get :
vid = videoinput(’winvideo’,1, ‘RGB24_320×240′);
??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO
please help me. what is cuse of “device id is 0 or empty” and who can transverse it to 1?
tanks
pls send rasponse for mail
David said
Hello baishali,
I had the same problem, but i solved this way:
1-. Before opening matlab, install the drivers of the webcam.
2-. Start Matlab, and use:
info = imaqhwinfo;
3-. Then start image viewing by:
vid = videoinput(cell2mat(info.InstalledAdaptors))
4-. Open window image viewer
preview(vid)
… And that should work
Else said
Help!
Here is the code I ran on the Matlab…
% reset
imaqreset
clear all
% initial
[yy,fs]=wavread(‘hw1.wav’);
%
vidobj = videoinput(‘winvideo’,1);
set(vidobj, ‘FramesPerTrigger’,1);
set(vidobj, ‘TriggerRepeat’,inf);
triggerconfig(vidobj, ‘manual’);
start(vidobj);
i=1;
n=1
% get
while 1,
trigger(vidobj);
frame=getdata(vidobj);
if(i==1),
b=frame;
imwrite(b,’base.jpg’);
end
y=frame;
p=mean(mean(abs(b(:,:,3)-y(:,:,3))));
if(p>30),
sound(yy(55355:66411),fs)
pause(1);
n=n+1;
if(n==3),
stop(vidobj);
break;
end
end
i=i+1;
end
%stop(vidobj);
But the Matlab showed that
Error event occurred at 22:59:18 for video input object: UYVY_160×120-winvideo-1.
winvideo: Image acquisition device cannot acquire.
Make sure no other objects or applications are accessing the same device.
What the problem is??????
Please help!!!!!!
amy said
how to do auto capture image in every 5 seconds ???
can u send me the code for refer ??
elhaam said
hi,
i have a problem for taking snapshot,i’ve instulled my webcam and for preview everything is ok, but when i want to snapshot the colour of the image is been red,could u pls help me,
thanks.
elhaam
Muhammad Irfan said
Hello
sir when i type this code
>> vid=videoinput(‘winvideo’,1,’RGB24_320X240′)
??? Error using ==> videoinput.videoinput
The FORMAT specified is not supported by this device. See IMAQHWINFO(ADAPTORNAME).
that error will occure.
Also my measure problem is that when i can take image by using
vid=videoinput(‘winvideo’)
so that image is not same as my real time image means it colour is very differnt like a flam
pop said
how can i write the code for Image compression using wavelet transform.couldnt get any idea to do this project. plz any one help me.
with regards
pop
humphrey ibifubara said
sir,how do i write the code for capturing image with a webcam connected to laptop and comparing it with already enrolled image-data in the laptop.thank you
hassan said
hi
i wont some commond using for control of servo motor
and i wont name of card interface using for PTZ camera and control cricute
thank u
Ryan said
Here is my code to work with two webcams (two Logitech webcams).
vidobj = videoinput(‘winvideo’,1);
vidobj2 = videoinput(‘winvideo’,2);
preview(vidobj)
preview(vidobj2)
Hope this will answer some of the questions above. I plan to write a program to control multiple webcams as those security monitor systems. Any suggestions?
nixan said
hi all,
im final year student doin Final year Project with help of Image Processing.basically im not very familier with image processing. however i hope to learn and finish this.
my expectation is this:
there is a scenario record by a webcam (saved as video format).
an image should prepare using that video.
this is small part of my project.
i want to know how to take a frame out of streaming video.
can anyone help me to solve this????
thanks in advance.
edward said
Hai everyone..im currently do my project on automatic object identification system..now,im on 5th week of my project but still confuse..i need some advise because im not familiar with image processing..is that by using matlab is more convenience or any other software?
noel said
is there some think I can capture my wife webcam when we chat on yahoo??
gowthami said
iam final B.tech ECE iam doing project’digital image processing based automatic object detect’ using MATLAB can you give any matter obout it in this we are using stepper motor ,webcam .please reply very soon it is urgent
gowthami said
please reply its very urgent
about earlier i posted
toon said
Thank you
toon said
I study in university I have project for complete
I have Question?
Imaqhwinfo : I can output alone
*but I can’t use to processing (I followed in comment 57)
I want code for capture frame
and Data output is?
Thank You Very Much!!!!
machmud said
hello every one
how i can record with optical webcam if i use matlab
I want code record in matlab
please send to rifadil_2mr@yahoo.com
Dharm Khoker said
sir i have a project to detect a man in given image(2D or 3D) using matlab.can u suggest me a algorithem to make it?
i hope u will help me.
thanks
ben said
hi, i am planning to do a optical flow mobile robot navigation which using a webcam. where can i get relate example on how to capture image by MATLAB then send out data to control the robot? i am using a laptop and i am beginner for MATLAB. thanks for help
Miquel said
Hi guys,
I have to do a project for the university using the data aquisition toolbox. I don’t have any webcam and then I’ll have to buy one. Can anybody tell me a webcam that does work with the toolbox. It would be nice to don’t have to buy a second webcam because of incompatibility between Matlab and the webcam.
thanks on advance
gita said
Can u help me about video streaming with matlab, because I difficult for solve my Final project to get bachelor degree
lll said
Helpful article. Now for the “final year” students. Work hard ok? No one will give you a final solution.
Mike said
For all the people trying to record from a webcam, I believe there is a way to make little movies using Matlab. Here is a link.
http://www.math.canterbury.ac.nz/~c.scarrott/MATLAB_Movies/movies.html
Dennis said
Hello i’m making a card-recognition algorithm via a webcam in a project and encountered a little problem.
We chose to take som pictures via a program called Logictech QuickCam ( a program which came with the camera ) and made our algorithm from it. And now that i’ve saved a snapshot. And i run a test on the snapshot i observed that the image was a lot more blurry, inaccurate or unsharpend (i’ve also tried the “fspecial” function inside matlab with “unsharp” without a good result ). I’m using a fixed zoom in both programs (inside matlab and the Logitech Quickcam software) and my algorithm is working “almost everytime” even though the distortion.. I wonder if any1 have encountered a similar problem??
I guess the problem is the settings from Logitec Quick cam, and it’s tuning options… But i got no idea how to get those specific settings into matlab even though i’m using “imagtool” which can save hardware settings to a *.m file.. Any input??
Best regard
Dennis
Gan said
Hi madam,
I got few question abount the webcam showing,following is my code
imaqhwinfo
ans =
InstalledAdaptors: {‘coreco’ ‘winvideo’}
MATLABVersion: ‘7.6 (R2008a)’
ToolboxName: ‘Image Acquisition Toolbox’
ToolboxVersion: ‘3.1 (R2008a)’
when i type info
info =
AdaptorDllName: [1x81 char]
AdaptorDllVersion: ‘3.1 (R2008a)’
AdaptorName: ‘winvideo’
DeviceIDs: {[2] [3]}
DeviceInfo: [1×2 struct
and when i type following command i get :
vid = videoinput(’winvideo’,1, ‘RGB24_320×240′);
i get
Error using ==> videoinput.videoinput at 268
No device is available at the specified DEVICEID. See IMAQHWINFO(ADAPTORNAME).
Error in ==> webcam at 1
vid = videoinput(‘winvideo’,1, ‘RGB24_320×240′);
please reply me on my email.
abdou said
How I can capture image from my webcame at my laptop dell
abu said
hello sir,
pls send me teh codez for my phd thesis
thx
kitty said
Thanks man that snapshot thing was really useful.
Murthy said
Thanks for usefull article.
Islam Yousry said
Thanks very much for your help …
soran said
please how i can save thevidio in to the matlab.
bocause i need that for ask make image process to that
soran said
please how i can save thevidio in to the matlab.
bocause i need that for ask make image process to the pic
phongnv2014 said
Hi, everyone!
I have a problem, I hope you can help me.
this: How save image after acquisition image from webcam to workspace? and what do these images type of?
How do convert they into .JPG,.bnp,or .tiff.
Please help me. Thank you.
phongnv2014 said
Please send your’squestion to mymail: nguyenvanphong.us@gmail.com.
Thank you very much!
Lee said
Hi sir/madam,
Could you please send a matlab code for color detection where one should be able to filter only an image of particular RGB value and not by using ‘roipoly’ function ….
Ayesha Sani said
Hi.
I am a final year student and doing my final project in Image processing..I am new in MAtlab ,So its quite hard for me to do the project i need the help.Plz help me out
In my project i jave to make live vedio through webcam then dtect the moving and static object in that vedio and maeasure the distance between the static and moving objects..
Actually my project is a CHILD SURVILANCE SYSTEM..
So I need the help in doing the projcet
even i dont know how to start my project plz guide me that how to do this project and i also want the open source code for capturing the vedio in matlab….detect the moving and ststic object So plzzzz Help me
Thanks in Advance.
Regard
Ayesha Sani
harin said
Hi madan,
I’m doin my final year project which involves image processing to make a TV controller. I want to know whether it’s possible to program a HCS12 microcontroller through matlab.can matlab access the serial port so i can use the RS232?? yuour help on this is very much appreciated.cheers.
doraemon said
hey, thanks a lot,it really help!!^_^
Bob said
Hi..
I got problem with my 2 webcam..I have two same webcam SUNFLOWER and plug them on my PC.
Then I process on Matlab 6.1 with this syntax:
>> imaqhwinfo
ans =
InstalledAdaptors: {‘winvideo’}
MATLABVersion: ‘6.5.1 (R13SP1)’
ToolboxName: ‘Image Acquisition Toolbox’
ToolboxVersion: ‘1.1 (R13SP1)’
>> vid=videoinput(‘winvideo’);
>> get(vid,’Source’)
Display Summary for Video Source Object:
Index: SourceName: Selected:
1 ‘input1′ ‘on’
Why MATLAB only detect 1 webcam?? How I gonna make realtime two webcam if MATLAb only detect 1 webcam?
Plzz help me..coz this is for my final project..
Thank you..
rajesh said
Pls, help !!!
My problem is: “I have plugged my WC to my PC, installed its driver, and it worked well. But when i typed “imaqhwinfo(’winvideo’)” in command windows, i got responses as below:
>> info = imaqhwinfo(‘winvideo’)
info =
AdaptorDllName: [1x81 char]
AdaptorDllVersion: ‘1.10 (R2006a)’
AdaptorName: ‘winvideo’
DeviceIDs: {1×0 cell}
DeviceInfo: [1x0 struct]
–> What’s my DeviceIDs?
>> vid = videoinput(‘winvideo’, 1,’RGB24_320×240′);
??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
I can’t specify the adaptor name and resolution. Please help!!!
rajesh said
Hello
sir when i type this code
>> vid=videoinput(’winvideo’,1,’RGB24_320X240′)
??? Error using ==> videoinput.videoinput
The FORMAT specified is not supported by this device. See IMAQHWINFO(ADAPTORNAME).
that error will occure.
with regards
rajesh
vinayak said
info =
AdaptorDllName: [1x81 char]
AdaptorDllVersion: ‘1.10 (R2006a)’
AdaptorName: ‘winvideo’
DeviceIDs: {1×0 cell}
DeviceInfo: [1x0 struct]
if you are getting this info with DeviceIDs means that device is not supported by the Matlab. Try out with another webcam(usually all web cams are supported. What is the port used to connect to the PC
Dikshant said
Hi. Can someone please tell me how to wait for a command for a command from a pic microcontroller (connected via Rs232) to run a function for Data Acquisition (Sound samples) in matlab. I need to to control stepper motors to make them move 100 postions and take samples at each position.
Thanks.
Dikshant.
vikram said
hi .. i have a matlab code for motion detection .. but i am unable to debug it can someone help me debug it…
i ll mail the code if some one can debug it…
the errors are as follows…
Warning: File ‘log.txt’ not found.
> In motion_detection>togglebutton1_Callback at 96
In gui_mainfcn at 75
In motion_detection at 42
Warning: File ‘film.avi’ not found.
> In motion_detection>togglebutton1_Callback at 97
In gui_mainfcn at 75
In motion_detection at 42
Warning: File ‘var.mat’ not found.
> In motion_detection>togglebutton1_Callback at 98
In gui_mainfcn at 75
In motion_detection at 42
radio =
1
??? Error: File: C:\MATLAB7\work\Codes\sad_algorithm.m Line: 17 Column: 17
Missing variable or function.
Error in ==> motion_detection>togglebutton1_Callback at 101
sad_algorithm
Error in ==> gui_mainfcn at 75
feval(varargin{:});
Error in ==> motion_detection at 42
gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback.
Anin said
hi vikram,
i thnk i cn help u debug…mail the code..
milad said
hi
i need to capture a movie with webcam and then convert i to frames howcani do tis
(all this seps should be realtime)
abdul rab said
hello every body
i need help
i want to do image processing of bottles.main task is to reject a broken bottle from a conveyour belt.
i wana do this from matlab with image comparison and template matching.
i have made a programme but it cant match template correctly.
if any body can help me in this matter reply me at my email id
rite2abdul@hotmail.com
i ll send the code….
plz plz its very very urjent………
abdul rab said
hello every body
i need help
i want to do image processing of bottles.main task is to reject a broken bottle from a conveyour belt.
i wana do this from matlab with image comparison and template matching.
i have made a programme but it cant match template correctly.
if any body can help me in this matter reply me at my email id
rite2abdul@hotmail.com
i ll send the code….
plz plz its very very urjent………
abdul rab said
please reply me as soon as possible if any person can do a good template matching.
its very urjent
plz plz plz
help
reply me on my email id i ll send the code
Asma said
hello,
i want help regarding image capture from web cam…and i did it but i want tht it will work in graphical user interface..plz gude me how can i do this
plz rply me
niloo said
Hi,
does anybody know how can i processed a saved video file in matlab? for example take frames out of it.
thank u
walex said
pls i really need assistance about my final year project,
can somebody bail me out,
am looking for a means of connecting webcam with mathlab and perform the following operation on
captured image,
cropping of image,converting to gray scale,segmentation of some part of the image using quadtree,
pls kindly help ,here is my adress./……checkwale2002@yahoo.com
etudiantarp said
hello
please i need a help, i have probleme with webcam, i have 2 PCs connected in the net ,i want to transmit a video via the net from pc 1 to pc 2 with matlab.
thank you
etudiantarp said
hello
please i need a help, i have probleme with webcam, i have 2 PCs connected in the net ,i want to transmit a video via the net from pc 1 to pc 2 with matlab.
if any one want to help me, he sent me in eroman382@gmail.com
thank you
Mais said
hello,
i need help please,my problem is in my graduation project i need my security system camera to track an intruder automatically and i was told i can do it on matlap.. how can i do it and is it a programing issue or just something can be done on matlab.. thank you in advance for help..
ASIF MEHMOOD said
I have problem to detect USB camera in matlab
but failed what is the procedure
sudantha said
i’m doing image processing project as my final year project. i want to detect yellow color areas from a video…can u help me?
Matlab Image Acquisition « My Weblog said
[...] Matlab Image Acquisition Thanks to Madan! [...]
Prionkor said
Here is the solution for the ERROR :
vid=videoinput(’winvideo’,1,’RGB24_320X240′)
??? Error using ==> videoinput.videoinput
The FORMAT specified is not supported by this device. See IMAQHWINFO(ADAPTORNAME).
Try this:
vid = videoinput(‘winvideo’,1);
There is a problem with the video format ’RGB24_320X240′ thats why the program is causing error. Thanks.
kerry william said
How can you get the “Lnks for ModelSim(R)” in the toolbox list?
I have Matlab with EDA Simulator Link toolbox and ModelSim SE but I do not have “Links for Modelsim(R)” in my toolbox list
Alllfff said
I have a high speed camera (200fps) connected through Ethernet, I need to get snapshot every 1/200s for lets say 10 seconds…any idea? I know lots of snapshots, but Its for an analysis of things happening in the frame lets say 200×200 pixels.
varun said
hi
i have a hp laptop and i want to use it to capture images or videos using matlab for my project.
i run following commands
>> vid=videoinput(‘winvideo’, 1,’YUY2_768×576′)
Summary of Video Input Object Using ‘HP Analog Capture’.
Acquisition Source(s): tuner is available.
Acquisition Parameters: ‘tuner’ is the current selected source.
10 frames per trigger using the selected source.
‘YUY2_768×576′ video data to be logged upon START.
Grabbing first of every 1 frame(s).
Log data to ‘memory’ on trigger.
Trigger Parameters: 1 ‘immediate’ trigger(s) on START.
Status: Waiting for START.
0 frames acquired since starting.
0 frames available for GETDATA.
>> preview(vid)
then i get a window with black screen
what do i do?
Diogo said
Try,
>> vid = videoinput(‘winvideo’,1, ‘YUY2_640×480′);
>> preview (vid)
Who knows if your PC cannot grabe image with that resolution… And if you pass this way now you know that your laptop works with MATLAB and the only thing that you have to search it’s abut the resolution.
dahlia said
i am a final year student in cse. i work in a project face recognation using matlab 7. i need some help or code for face recognation. pls help me……………
dahlia said
anyone work in face recognation using matlab……..pls mail me with code…………….
nafiadahlia@yahoo.com………..
pls..pls..pls….
…..its urgent………
Gia Ng said
Thanks madman!
)
july said
hello,Madan….
I got the same problem with bob on March 19, 2009.And i’ve done like Ryan said on July 25, 2008. I used two same webcam Logitech.
Please help me..this is for my final project..
Thank you..
tim demon said
Hello guys,
Who can tell me how i can adjust the refresh frequeny (frames per second) in “videoinput”. I like to get 25 till 30 frames per second if possible.
Thanx you all for all the past information on this site.. Really useful.
mert said
Hello everyone,
After “The FORMAT specified is not supported by this device. See IMAQHWINFO(ADAPTORNAME).” How can we change the image or video format, i can’t change the resolution 320X240, when i write:
vid = videoinput(‘winvideo’,1);
it gives me 160×120.
Dinesh Kumbhar said
thank you for info. abt image acqisition tool.
but i want to know abt how to get the adaptor name plz help me out.
regards.