Home > Computer Techie > Image capture using Webcam in Matlab

Image capture using Webcam in Matlab

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_320x240′);

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 :)

About these ads
Categories: Computer Techie
  1. March 23, 2007 at 7:00 pm | #1

    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

    • Krishna
      January 27, 2010 at 7:41 am | #2

      Hi this was an error due to the incorrect quotes (‘) try using single quotes from your keyboard itself. thx

  2. March 24, 2007 at 4:29 pm | #3

    :) Thanks Rob , Nice of you

  3. yogendra
    April 22, 2007 at 6:43 am | #4

    How to get a particular frame for processing…

  4. April 22, 2007 at 8:06 am | #5

    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?

  5. April 26, 2007 at 8:46 pm | #6

    thanks , man .
    useful information .

  6. arun
    May 14, 2007 at 5:15 pm | #7

    thank u ….

  7. trietnguyen
    July 19, 2007 at 11:04 am | #8

    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!!!

    • minhquan123
      March 20, 2011 at 9:23 am | #9

      Anh Nguyen Minh Triết ơi, có phải anh học trường đại học sư phạm kỹ thuật và đã làm đồ án robot bám vật không anh? em cũng đang làm đề tài đó nhưng không biết liên lạc với anh bằng cách nào, nếu đọc được tin nhắn này anh liên lạc với em qua nick yahoo: doanminhquan123, hoặc mail: doanminhquan123@yahoo.com.vn nhé! cảm ơn anh

    • Spoon
      November 19, 2012 at 4:26 pm | #10

      You must write “obj” instead of “vid”. Will work!

    • Om Prakash Shrama
      July 12, 2013 at 10:11 am | #11

      Your device id is 1.

    • Do Dong Chien
      February 15, 2014 at 9:53 am | #12

      anh ơi, e là sinh viên BKHN, e đang nghiên cứu về Object tracking, a giúp e với, học thầy ko tày học bạn.

  8. July 19, 2007 at 11:13 am | #13

    @trietnguyen
    Are you able to ust execute this command?
    vid = videoinput(‘winvideo’)

  9. trietnguyen
    July 19, 2007 at 1:26 pm | #14

    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...

    • vishal
      March 8, 2014 at 6:30 am | #15

      plzz help us….we did same procedure but we failed…..tell me the right way of implementation steps…..
      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...

  10. trietnguyen
    July 19, 2007 at 2:00 pm | #16

    Hura!!! I did it. After typing “imaqreset” command, everything correct!!!
    Cheer, thank you madan, thank you!!!

  11. July 20, 2007 at 4:45 am | #17

    @trietnguyen
    Thanks for informing the change. Lot of people care least to do so.. Thanks once again.

    • hassan shahid
      June 11, 2010 at 2:37 pm | #18

      Hi.. im working on real time image processing, i m facing problem in using command
      vid = videoinput(‘winvideo’, 1, ‘RGB24_320x240′);
      Error using ==> videoinput.videoinput
      The FORMAT specified is not supported by this device. See IMAQHWINFO(ADAPTORNAME).
      help plz

      • jachawk
        June 15, 2011 at 7:30 pm | #19

        just replace the statement by
        vid = videoinput(‘winvideo’, 1, ‘YUY2_320x240′);
        n it should work

  12. Christian
    July 31, 2007 at 9:02 pm | #20

    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

  13. August 3, 2007 at 8:14 am | #21

    @christian

    Download this file and add it to your library and try it
    check out here

  14. sixaxis
    August 24, 2007 at 2:57 am | #22

    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?

  15. Osama Nasir
    August 30, 2007 at 6:21 pm | #23

    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

  16. Norain
    September 9, 2007 at 9:07 am | #24

    thank you man very much it is realy usefull

  17. Parisa
    September 24, 2007 at 3:14 am | #25

    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,

  18. chongwan
    September 27, 2007 at 6:32 am | #26

    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

  19. ankur jain
    October 17, 2007 at 7:05 pm | #27

    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

  20. Tarang
    October 24, 2007 at 4:27 pm | #28

    Hi,
    Any idea where the snap shot is stored in the matlab once it has been taken so that one can recall if required

    • September 12, 2011 at 4:10 pm | #29

      hii its is stored in your workspace and will be deleted once the matlab program is closed

  21. October 24, 2007 at 5:39 pm | #30

    the variable that u assign it to is where it is stored. u may decide to save that value for suture use too.

    • ishan
      May 10, 2013 at 6:25 pm | #31

      please tell me where will be those captured images are stored and also how do I save in a specified place??

  22. arda
    November 5, 2007 at 9:48 pm | #32

    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

  23. November 6, 2007 at 8:30 pm | #33

    use a delay function, call it inside the for loop. You can get delay.m online if yoiu search for it

  24. arda
    November 6, 2007 at 8:43 pm | #34

    thanks for your help i ‘ll try it..

  25. rax
    November 9, 2007 at 7:07 am | #35

    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

    • ENGINEER ADEEL
      May 10, 2013 at 6:42 am | #36

      use this instead it will work
      vid = videoinput(‘winvideo’, 1, ‘YUY2_320x240′);

      i have use this me self……

    • vikash
      October 7, 2013 at 9:32 pm | #37

      try
      imaqhinfo(‘winvideo’,1)

      and then

      imaqhinfo(‘winvideo’,2) // if u have more than one cam

  26. vk
    November 11, 2007 at 4:31 pm | #38

    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…………………….?

  27. Manoj
    November 15, 2007 at 4:49 pm | #39

    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_352x288′ 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

  28. November 26, 2007 at 7:35 pm | #40

    >> preview(vid);
    >> vid = videoinput(’winvideo’)
    >> data = getsnapshot(vid);
    >> save data

    This will give save the picture for you

    • October 7, 2009 at 5:54 am | #41

      but where it stores, imean folder
      rply sharp

    • Abdul
      October 25, 2013 at 10:04 pm | #42

      Where the data is saved in this example? and in what format?

  29. suley
    December 10, 2007 at 2:34 am | #43

    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..

    • hassan elbasri
      June 4, 2011 at 6:52 am | #44

      hi how are you first i would like to say iam new here and iam so happy to be here
      you want to calculate the distance of object iam Msc student i have some project in image processing and my paper talk about how to calculate the object distance the main point to know or calculate the camera filed of view and after that know the ratio of number of pixels & camera field of view
      hassan

  30. ansh
    December 14, 2007 at 5:44 pm | #45

    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!!!

  31. Alireza
    December 18, 2007 at 3:54 pm | #46

    I need one article about line follower robots with image processing
    that wrote with matlab7
    thank you very much
    I wait for u

  32. sadha
    January 4, 2008 at 6:22 am | #47

    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!!!

  33. Mike
    January 12, 2008 at 8:43 pm | #48

    Can I capture an image from a webcam using an m file that has been converted to an executeable file?

    • hassan elbasri
      June 4, 2011 at 6:55 am | #49

      yeah you can but now really i dont have the steps but i promise u when i get it i will write this steps ok

  34. feddy
    January 29, 2008 at 12:21 pm | #50

    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

  35. January 30, 2008 at 3:43 pm | #51

    Is the robot able to transfer to PHP?

  36. Feddy
    February 4, 2008 at 1:54 pm | #52

    Kindly do help me in interfacing mobile phone(W810i)with matlab7 for capturing images!!!!

  37. Feddy
    February 4, 2008 at 2:12 pm | #53

    Hello Madan!
    Can u plz hepl me out?

  38. mohammad
    February 5, 2008 at 8:35 am | #54

    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

  39. rosma
    February 11, 2008 at 3:31 am | #55

    i’ve use logitech webcam RGB24_352x288 resolution for matlab, but the image cannot exist. what the suitable webcam that i have to use?

    thanks
    pls send respond to mail

  40. Sutharshan
    February 19, 2008 at 12:35 pm | #56

    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.

  41. rakesh
    February 19, 2008 at 3:59 pm | #57

    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?

  42. Anne
    March 3, 2008 at 5:11 pm | #58

    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..

  43. anupriya
    March 4, 2008 at 10:48 pm | #59

    thnx……..

  44. krishan
    March 5, 2008 at 5:52 am | #60

    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.

  45. Anoop
    March 7, 2008 at 3:09 am | #61

    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

  46. rahul
    March 9, 2008 at 3:06 pm | #62

    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

  47. chaitanya
    March 12, 2008 at 2:43 am | #63

    friends i am working on project hand gesticulation recognition. can any body tell me how can i track hand using matlab in video.thankyou…

  48. mk
    March 19, 2008 at 8:09 am | #64

    would the command works for usb webcam and file wmv video file

  49. March 21, 2008 at 10:48 am | #65

    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

  50. behnam
    April 14, 2008 at 3:53 am | #66

    hello
    i want to know how webcam interface with matlab?
    thx

  51. kyle
    April 15, 2008 at 12:46 am | #67

    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

  52. Muhammad Irfan
    April 30, 2008 at 11:52 am | #68

    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

  53. silivis
    April 30, 2008 at 4:27 pm | #69

    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.

  54. alok
    May 3, 2008 at 6:45 am | #70

    thanks……………….

  55. baishali
    May 23, 2008 at 1:41 pm | #71

    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

  56. David
    May 26, 2008 at 7:26 pm | #72

    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 :)

    • Faizan
      October 31, 2010 at 10:25 am | #73

      thnx david it works.

    • adeel arif
      June 7, 2011 at 7:52 am | #74

      thanks a lot david it works thanks a lot.
      can you explain this command. i mean to say why are we getting the following error
      ??? Error using ==> videoinput.videoinput
      before this command
      vid = videoinput(cell2mat(info.InstalledAdaptors))
      waiting for your reply :)

    • kiki
      August 29, 2011 at 8:49 am | #75

      hi dave, i use usb webcam a4tech and i have installed the a4tech.exe but it still not recognized, then what driver do you mean? thx alot

    • sujata
      July 4, 2013 at 5:23 pm | #76

      helo sir, i am doing project on “motion detection form video” can you please help me , firstly how to recoed video from webcame in matlab” plz reply
      thanku,
      best regards.

  57. Else
    June 12, 2008 at 4:01 pm | #77

    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_160x120-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!!!!!!

  58. amy
    July 2, 2008 at 4:34 am | #78

    how to do auto capture image in every 5 seconds ???
    can u send me the code for refer ??

  59. elhaam
    July 11, 2008 at 10:01 am | #79

    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

  60. Muhammad Irfan
    July 14, 2008 at 5:26 am | #80

    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

  61. pop
    July 15, 2008 at 11:03 am | #81

    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

  62. humphrey ibifubara
    July 16, 2008 at 12:29 pm | #82

    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

  63. July 23, 2008 at 9:45 am | #83

    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

  64. Ryan
    July 25, 2008 at 5:10 am | #84

    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?

  65. nixan
    July 29, 2008 at 1:39 pm | #85

    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.

    • wajid
      July 28, 2011 at 11:28 am | #86

      hi…..i have same problem…….if u got the point plz share it with me…… i am also searching..

  66. edward
    August 12, 2008 at 10:39 am | #87

    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?

  67. noel
    August 22, 2008 at 1:26 am | #88

    is there some think I can capture my wife webcam when we chat on yahoo??

  68. gowthami
    August 25, 2008 at 2:32 pm | #89

    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

  69. gowthami
    August 26, 2008 at 3:27 pm | #90

    please reply its very urgent
    about earlier i posted

  70. toon
    September 2, 2008 at 6:52 pm | #91

    Thank you

  71. toon
    September 2, 2008 at 9:35 pm | #92

    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!!!!

  72. machmud
    September 13, 2008 at 2:14 pm | #93

    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

  73. Dharm Khoker
    September 18, 2008 at 5:03 pm | #94

    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

  74. ben
    September 22, 2008 at 3:57 pm | #95

    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

  75. Miquel
    October 28, 2008 at 4:26 pm | #96

    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

  76. gita
    October 30, 2008 at 8:36 pm | #97

    Can u help me about video streaming with matlab, because I difficult for solve my Final project to get bachelor degree

  77. lll
    November 12, 2008 at 7:41 am | #98

    Helpful article. Now for the “final year” students. Work hard ok? No one will give you a final solution.

  78. Mike
    November 27, 2008 at 4:08 am | #99

    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

  79. Dennis
    December 2, 2008 at 9:01 pm | #100

    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

  80. Gan
    December 17, 2008 at 6:14 pm | #101

    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.

  81. abdou
    January 16, 2009 at 11:36 pm | #102

    How I can capture image from my webcame at my laptop dell

  82. abu
    January 23, 2009 at 7:14 pm | #103

    hello sir,
    pls send me teh codez for my phd thesis
    thx

  83. January 30, 2009 at 3:16 pm | #104

    Thanks man that snapshot thing was really useful.

  84. Murthy
    February 11, 2009 at 10:25 am | #105

    Thanks for usefull article.

  85. Islam Yousry
    February 12, 2009 at 11:10 am | #106

    Thanks very much for your help …

  86. soran
    March 2, 2009 at 9:22 am | #107

    please how i can save thevidio in to the matlab.
    bocause i need that for ask make image process to that

  87. soran
    March 2, 2009 at 9:23 am | #108

    please how i can save thevidio in to the matlab.
    bocause i need that for ask make image process to the pic

  88. phongnv2014
    March 2, 2009 at 2:41 pm | #109

    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.

  89. phongnv2014
    March 2, 2009 at 2:44 pm | #110

    Please send your’squestion to mymail: nguyenvanphong.us@gmail.com.
    Thank you very much!

  90. Lee
    March 3, 2009 at 10:11 am | #111

    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 ….

  91. Ayesha Sani
    March 7, 2009 at 10:37 am | #112

    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

  92. harin
    March 11, 2009 at 12:55 pm | #113

    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.

  93. doraemon
    March 17, 2009 at 4:05 am | #114

    hey, thanks a lot,it really help!!^_^

  94. Bob
    March 19, 2009 at 12:24 pm | #115

    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..

  95. rajesh
    March 21, 2009 at 8:31 am | #116

    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!!!

  96. rajesh
    March 21, 2009 at 8:38 am | #117

    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

  97. vinayak
    April 7, 2009 at 9:36 am | #118

    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

  98. Dikshant
    April 10, 2009 at 2:45 am | #119

    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.

  99. vikram
    April 11, 2009 at 5:32 pm | #120

    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.

  100. milad
    April 15, 2009 at 5:42 pm | #126

    hi
    i need to capture a movie with webcam and then convert i to frames howcani do tis
    (all this seps should be realtime)

  101. abdul rab
    April 21, 2009 at 3:51 pm | #127

    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………

  102. abdul rab
    April 21, 2009 at 3:52 pm | #128

    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………

  103. abdul rab
    April 21, 2009 at 4:08 pm | #129

    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

  104. Asma
    May 16, 2009 at 6:36 am | #130

    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

  105. niloo
    May 16, 2009 at 10:17 am | #131

    Hi,
    does anybody know how can i processed a saved video file in matlab? for example take frames out of it.
    thank u

  106. walex
    May 28, 2009 at 4:59 am | #132

    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

  107. etudiantarp
    June 6, 2009 at 9:51 am | #133

    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

  108. etudiantarp
    June 6, 2009 at 9:52 am | #134

    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

  109. Mais
    June 10, 2009 at 6:09 am | #135

    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..

  110. ASIF MEHMOOD
    June 28, 2009 at 11:47 am | #136

    I have problem to detect USB camera in matlab
    but failed what is the procedure

  111. sudantha
    June 28, 2009 at 8:15 pm | #137

    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?

  112. Prionkor
    August 28, 2009 at 4:42 pm | #138

    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.

  113. kerry william
    September 15, 2009 at 4:18 am | #139

    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

  114. Alllfff
    October 1, 2009 at 11:12 am | #140

    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.

  115. varun
    October 3, 2009 at 3:41 pm | #141

    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_768x576′)

    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_768x576′ 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
      October 12, 2009 at 2:47 pm | #142

      Try,

      >> vid = videoinput(‘winvideo’,1, ‘YUY2_640x480′);
      >> 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.

  116. dahlia
    October 9, 2009 at 7:25 am | #143

    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……………

  117. dahlia
    October 9, 2009 at 7:28 am | #144

    anyone work in face recognation using matlab……..pls mail me with code…………….
    nafiadahlia@yahoo.com………..
    pls..pls..pls….
    …..its urgent………

  118. Gia Ng
    October 12, 2009 at 5:39 pm | #146

    Thanks madman! :))

  119. july
    October 14, 2009 at 12:21 am | #147

    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..

  120. tim demon
    October 19, 2009 at 5:33 pm | #148

    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.

  121. October 25, 2009 at 12:43 pm | #149

    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.

  122. Dinesh Kumbhar
    October 27, 2009 at 4:21 am | #150

    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.

  123. mohsen dorraki
    November 18, 2009 at 7:08 pm | #151

    Really thanks
    It was very useful

  124. Eugi
    November 19, 2009 at 10:41 pm | #152

    Hello,
    I have two identic cams and i want to take some pics simultaneously with a specific exposure. I allready have access to them but only one after an other.

    Please help

  125. rian adi tya
    November 30, 2009 at 12:46 am | #153

    thanks

  126. Bora
    November 30, 2009 at 3:55 pm | #154

    Hi all! I lookong for way to measure distance between two objects.
    Does someone can help me?
    Thank you

  127. valerie
    December 3, 2009 at 1:42 am | #155

    Hi

    Can someone please help?
    Does anyone know the codes to import webcam inside a interface GUI using matlab?

  128. andrew
    December 7, 2009 at 3:44 am | #156

    hey anyone there…. i humbly requesting for your help… i’m working with my project and im goin to use matlab.. my project is about automatic scoring using only 2 webcams.. i’m a noob in using matlab.. but im interested to listen to all of you.. can u teach me?? pls pls pls….
    my first problem is how to get image using 2 webcam… 2nd is how will the matlab know if where is the location of the object(ex.. in darts, how can the matlab knw if where is the tips of the darts). and 3rd.. the scoring.. how will i map the scores in only 1 image(database). your help is much appreciated… thanks… i’l w8.. pls…..

  129. freynando
    December 9, 2009 at 10:29 am | #157

    Does anyone know the codes to import image not video from webcam inside a interface GUI using matlab?

  130. Ramana
    December 19, 2009 at 8:08 am | #158

    well. how can we differentiate the color’s (pixel detection) in the image captured.

  131. December 20, 2009 at 10:27 am | #159

    Hello,
    I have two identic cams and i want to take some pics simultaneously with a specific exposure. I allready have access to them but only one after an other.

    plz help me

  132. dream
    December 23, 2009 at 9:34 pm | #160

    vk said
    November 11, 2007 at 4:31 pm
    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…………………….?

    i have the same idea , please any one can help you ?
    thanks

  133. Plz Help Me Out
    December 31, 2009 at 11:22 pm | #161

    motion capturing and calculate its center point (x and y coordinates)

    my problem is that how can i run this code by interfacing camera and play it in real time instead of running sample videos which is in AVI format.

    plz any one help me and rpl me as fast as u can :-s. . .
    thnx
    siddiqui.moiz@hotmail.com

    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
    clear data
    clc
    disp(‘Display Input Video Screen’);

    avi = aviread(‘samplevideo.avi’);
    video = {avi.cdata};
    for a = 1:length(video)
    imagesc(video{a});
    axis image off
    drawnow;
    % end;
    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%

    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
    disp(‘Display Output Video Screen’);

    if ischar(video)
    avi = aviread(video);
    pixels = double(cat(4,avi(1:2:end).cdata))/255;
    clear avi

    else
    pixels = double(cat(4,video{1:2:end}))/255;
    clear video
    end
    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
    framess = size(pixels,4);
    for f = 1:framess
    pixel(:,:,f) = (rgb2gray(pixels(:,:,:,f)));
    end
    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
    rows=240;
    columns=255;
    rames=f;
    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
    for l = 2:rames
    d(:,:,l)=(abs(pixel(:,:,l)-pixel(:,:,l-1)));

    k=d(:,:,l);
    bw(:,:,l) = im2bw(k, .2);
    bw1=bwlabel(bw(:,:,l));
    imshow(bw(:,:,l))
    hold on
    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
    count=1;
    for h=1:rows
    for w=1:columns

    if(bw(h,w,l)>0.5)
    toplength = h;

    if (count == 1)
    tppoint=toplength;
    end
    count=count+1;
    break
    end
    end
    end
    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
    coun=1;
    for w=1:columns
    for h=1:rows
    if(bw(h,w,l)>0.5)
    leftside = w;

    if (coun == 1)
    lftpoint=leftside;
    coun=coun+1;
    end
    break
    end
    end
    end
    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
    widthrect=leftside-lftpoint;
    heightrect=toplength-tppoint;
    widthcenter=widthrect/2;
    heightcenter=heightrect/2;
    xcenter=lftpoint+widthcenter;
    ycenter=tppoint+heightcenter;
    wth(l)=xcenter;
    hth(l)=ycenter;

    rectangle(‘Position’,[lftpoint tppoint widthrect heightrect],’EdgeColor’,’g’);

    x = uint8(xcenter);
    y = uint8(ycenter);

    plot(x,y, ‘r*’);
    drawnow;
    hold off
    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%

    disp(x);
    disp(y);
    end;
    %=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%

    • October
      May 19, 2010 at 3:24 pm | #162

      hello, i find the website by google. And i am also searching to find the center of a moving object by using webcam in real-time. Do you solve the problem yet? may i ask for the code. plz mail me! plz. thx a lot.

  134. January 4, 2010 at 4:46 am | #163

    Hi I found this site by mistake when i was searching bing for this registry cleaner issue, I have to

  135. Siyavash.Hamdi
    January 5, 2010 at 5:38 pm | #164

    Hi all!
    I wanna use image proccessing in matlab…
    -but the MatLab does not find my webcam driver.
    -My webcam’s name is ‘Generous’.
    -I can use my webcam in its software.
    -Before installation of my camera, the following information in matlab was availabled:

    >> imaqhwinfo

    ans =

    InstalledAdaptors: {‘coreco’ ‘winvideo’}
    MATLABVersion: ’7.2 (R2006a)’
    ToolboxName: ‘Image Acquisition Toolbox’
    ToolboxVersion: ’1.10 (R2006a)’

    ——————–
    -After installation of my camera, the same information was showen. mean:

    >> imaqhwinfo

    ans =

    InstalledAdaptors: {‘coreco’ ‘winvideo’}
    MATLABVersion: ’7.2 (R2006a)’
    ToolboxName: ‘Image Acquisition Toolbox’
    ToolboxVersion: ’1.10 (R2006a)’

    ——————

    * I use the ‘coreco’ and ‘winvideo’ in following but the MatLab could not communicate with my camera…

    Plese help me that how can I solve this problem?

    THANKS…

  136. tato4ever
    January 7, 2010 at 2:53 am | #165

    hi

    i want a matlab code for counting object in image or background elimination for my garduation project i really need help coz i can’t figure it out can any one help me out please please

  137. lekshmi
    January 15, 2010 at 6:37 am | #166

    Hi,
    I am working on a project based on eye tracking ie tracking the pupil of the person. so i need to capture video using a `falcon` camera which is connected to the PCI card.i am not able to initialize the camera using matlab.
    Please help me with this.

  138. Nikhil Bhendawade
    January 29, 2010 at 6:51 pm | #167

    when we use obj=getsnap(vid) exactly which frame is stored in obj..????because there are so many frames in vid(video)…please illustrate

  139. lady
    February 18, 2010 at 4:26 pm | #168

    hi,
    i’m trying to get images from my webcam with matlab.
    i use the image acquisition toolbox, but i have some troubles with the resolution of the acquired images. i’d like to set it at 640×480, how can i do this?
    thank you very much

  140. ankita sharma
    February 22, 2010 at 6:57 am | #169

    HI i am in trouble due to my final year project ,which is target tracking in matlab.
    it is not a real time application .
    i have a code for input the video but in further code i got trouble.
    help me
    pls contact me through my mail

  141. ankit
    February 22, 2010 at 7:30 pm | #170

    hi!
    i just wanted to know how to use mobile phone as a camera using matlab

  142. Ahmad
    March 3, 2010 at 9:01 am | #171

    Dear all,

    I made GUI for showing a video stream using webcam on one axis {axes(handles.input_fig);} and I want to get snapshot from this axis to dispaly it at another axis.
    fortunately, I have previewed the video in the first axis but I could not capturing an image from it.

    my question is how can get snapshot from GUI figure axis?

    Thank you in advanced…

  143. Ahmad
    March 3, 2010 at 9:02 am | #172

    Dear all,

    I made GUI for showing a video stream using webcam on one axis {axes(handles.input_fig);} and I want to get snapshot from this axis to dispaly it at another axis.
    fortunately, I have previewed the video in the first axis but I could not capturing an image from it.

    my question is how can get snapshot from GUI figure axis?

    Thank you in advanced…

    • June 22, 2011 at 8:54 pm | #173

      hi i saw your post, m facing the same thing regarding my final year project. can you mail me the code or give the answer to the question if u already have solved it.
      regards

  144. rubab
    March 7, 2010 at 8:34 am | #174

    hi all

    i have a problem regarding video input in matlab..
    actually i have a builtin camera in my laptop. but for my project i need to use an external camera with better resolution.

    but the problem here is whenever i run my code for video input, it uses the builtin camera by default..
    how can i use the external cameraa.. plz help me

  145. Samer Sameh Helmy
    March 11, 2010 at 1:28 pm | #175

    helllo everybody ,,, really I have a big problem
    I have a video which I want to recognize using a matlab code
    what is the alogorith to make a video recognition
    Simply , there is a ball which I want to mark it using a cursor ,, I want to use a simple algorithm ,, how can I implement it
    Thanks in advance;

  146. uday
    March 12, 2010 at 5:13 am | #176

    hai , i want a matlab progarm to track the astronomical objects

  147. sabiha
    March 26, 2010 at 8:15 pm | #177

    hello….

    i am doing a real time project that is face recognition using webcam and i am in need of code that recognises the face through webcam….plzzzz i am very much in need …do reply me as soon as possible..

  148. akash
    April 1, 2010 at 2:40 am | #178

    Hi all!
    i need some1 to convert the followings codes to extract image frames from a already recorded video stream?

    vid=videoinput(‘winvideo’,1);
    triggerconfig(vid,’manual’);
    set(vid,’FramesPerTrigger’,1);
    set(vid,’TriggerRepeat’,Inf);
    start(vid);

    while(1)
    for j=1:3
    trigger(vid);
    im=getdata(vid,1);
    if j==1
    i_bef=im;
    end
    if j==3
    i_aft=im;
    end
    end
    [x,y,u]=isub(i_aft,i_bef);
    end

    Thank you..

  149. uahmed
    April 5, 2010 at 3:08 am | #179

    hi all

    i am doing one project related to image processing , its like pan tilt tracking system , in which i do tracking of the moving object . if you have same project or similar to it do mail me so we can help each other my id is gleam.uahmed@gmail.com

  150. Nandish
    April 6, 2010 at 11:11 am | #180

    Hello,
    I need help.
    I want to know how can we acquired images continuously using I.A.Toolbox.I am using WebCam.

    vid = videoinput(‘winvideo’);

    % Configuring Parameter
    set(vid,’FramesPerTrigger’,200)
    set(vid,’FrameGrabInterval’,3)
    vid.TriggerRepeat = inf;
    set(vid,’LoggingMode’,’Memory’)
    triggerconfig(vid,’manual’)
    % set Memory
    imaqmem(700000000)
    cnt = imaqmem;
    mem_low = 100000000;
    mem_low1 = 200000000;
    mem_left = cnt.FrameMemoryLimit – cnt.FrameMemoryUsed;
    start(vid)
    trigger(vid)

    while(mem_left > mem_low)

    frame = getsnapshot(vid);
    I = rgb2gray(frame);
    imshow(I);

    if (mem_left < mem_low1)

    flushdata(vid);
    mem_left = cnt.FrameMemoryLimit – cnt.FrameMemoryUsed;
    end
    end
    stop(vid)

    But this is not working,cause as memory gets full it stops. I wanted to acquire images continuously.

    Thank you.

  151. emb
    April 8, 2010 at 4:08 pm | #181

    hi, i have to work with a robot with a webcam. i adquire the image i need and then i have to convert the pixel to centimetres. this is not easy because the webcam gives me distroied image. how can i correct it? thanks

  152. asal
    April 15, 2010 at 8:48 am | #182

    i need help for motion detection with matlab
    please help me
    tnx
    roztav2010@yahoo.com

  153. Don Vaughn
    April 28, 2010 at 7:24 pm | #183

    It took 12 seconds to take and save 10 snapshots at that resolutions. I’d like to analyze video input in real-time. Is there anyway to speed the processes of capturing and turning the data into an image?

  154. Rishi
    May 6, 2010 at 2:45 am | #184

    Hi…
    I want the code to interface Webcam in MATLAB and then to convert the image in Binary data so that i can run DC motor.
    plz send if anyone has

  155. Merwan
    May 7, 2010 at 6:10 pm | #185

    Hi..
    i am working in project where i have to send the image after the acquisation step to an FPGA to performe some signale processing in this image

    so if any one can help me to tell me how can i send this image to the FPGA in real time.

    Thank’s

  156. hitesh
    May 12, 2010 at 9:46 am | #186

    hi madan
    i am capturing an image from the webcam and then i want to find the coordinates of the edges of the items in the image so can u tell me how can i do this.
    thanks

  157. hitesh
    May 12, 2010 at 1:32 pm | #187

    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 asap me on my email.
    thnks

  158. danny
    May 26, 2010 at 11:50 pm | #188

    hi i am doing in iris image processing and i have the camera for the eye and when i use videoinput function it get the normal sence … i need the image in under red violation cause this camera take this postion… i need help ………

  159. danny
    May 26, 2010 at 11:52 pm | #189

    maybe there something with adaptor or some dll files that i need for this purpose..

  160. June 25, 2010 at 9:25 am | #190

    plz give me coding to capture image in matlab.
    because i m making project of video through attendance

  161. June 25, 2010 at 9:32 am | #191

    its urjent plzzz

  162. Noman Siddiqui
    July 5, 2010 at 11:16 am | #192

    i have to make GUI for my webcam. GUI that recalls my image from C drive. can any one please help me out. reply please

  163. Noman Siddiqui
    July 5, 2010 at 11:18 am | #193

    if anyone have a program for this please send me the program. on xtreme2610@hotmail.com

  164. Noman Siddiqui
    July 5, 2010 at 11:21 am | #194

    i have to make GUI for my webcam. GUI that recalls my image from C drive. or a GUI that play my video and capture image through webcam button. i want a permanent program for this. if anyone have a program please send me on xtreme2610@hotmail.com can any one please help me out. reply please

  165. durgesh
    August 17, 2010 at 2:41 pm | #195

    thanx a lot

  166. saravan
    August 18, 2010 at 1:00 pm | #196

    hi friends… i am doing a bot for image processing… i need to differentiate between 2 colours red and green coloured doors.. i need to check in the green coloured door.. how do i process the image and control my bot.. as i am a beginner.. it might be useful if u provide data from basics..
    thank u..

  167. sachin
    August 22, 2010 at 5:11 pm | #197

    can anybody tell me how to make a line follower using image proceessing

  168. gulraiz
    August 25, 2010 at 4:42 am | #198

    plzzzz need ur help…. can u help me from the begining of video prcessing in matlab.. i dont know a single thing.plz

  169. Aniruddh
    September 8, 2010 at 6:59 pm | #199

    Hey…How do i acquire image from a URL??

  170. Kalashinie
    November 24, 2010 at 4:07 am | #200

    Thank you very much for the tips.

  171. Bora
    November 24, 2010 at 5:52 am | #201

    Hey, check this video out!
    Great image processing, optimization and running robot, all using matlab 7

  172. December 15, 2010 at 1:31 am | #202

    hei, this is what i’m searching about! thank you very much for your sharing.

  173. faizan
    December 28, 2010 at 9:19 am | #203

    hey
    i am able to get the snapshot i want to get the real time coordinates of my hands so that i can use those coordinates fyrther can any1 help me i will be highly thankful to you

  174. JOs
    January 6, 2011 at 5:09 pm | #204

    thanks……

  175. mostafa
    January 23, 2011 at 10:06 pm | #205

    hi
    help me!!
    My problem is:
    >> vid=videoinput(‘winvideo’,1);
    ??? vid=videoinput(‘winvideo’,1);
    |
    Error: The input character is not valid in MATLAB statements or expressions.

    help me plz!!1

    • radhika
      April 16, 2011 at 12:17 pm | #206

      use ‘winvideo’
      the quotes are incorrect

  176. Shehryar Masaud
    January 27, 2011 at 6:26 am | #207

    Thanks alot…………..very helpful and quick to implement

  177. dilip
    January 28, 2011 at 4:46 pm | #208

    how can i get frames from running videos in matlab?and also how can i compare two images in matlab?

  178. hightym
    February 1, 2011 at 3:28 am | #209

    hi
    I am working on a project called License plate recognition system.I need to know how to interface webcam of laptop witj matlab.i want to open a picture of car license plate at main program im matlab which is captured by webcam of laptop.so how to open that captured vimage into matlab. pls guide me on this..
    Regards

  179. hightym
    February 1, 2011 at 3:38 am | #210

    hii
    pls guide me how to open a picture on matlab captured by webcam of laptop
    regards

  180. Manu
    February 16, 2011 at 4:30 am | #211

    After interfacing web camera,how to find where that stored video frames are,can u please help me with this……

  181. singh
    February 17, 2011 at 6:50 am | #212

    hi i am using matlab with webcam ..when i am run the program i got the error like this….Multiple VIDEOINPUT objects cannot access the same device simultaneously….how to solve this problem..please help any one quickly…thanks in advance

  182. adwan
    March 7, 2011 at 3:30 pm | #213

    hi please i want to ask how to get a data from serial port from pic 16f877a
    in matlab it is analog to digital value
    can i and how please send the answer to my e-mail

  183. radhika
    March 10, 2011 at 7:21 am | #214

    @singh: im getting the same error.
    did u find a solution?

  184. radhika
    March 10, 2011 at 7:33 am | #215

    Dear madan,
    my final year project is to make an eye mouse it capture eye movement and move the mouse accordingly.
    i want to know how to acquire and PROCESS IT in REAL TIME.
    i have developed the code once i get the frames.
    the problem is capturing frames in real time.

    also can the m file made into an executable then? i mean with the live video capture etc?

    please help at the earliest either here or on radhikamody119@gmail.com

    thanks!

  185. James
    March 15, 2011 at 10:26 am | #216

    Hi,i am using webcam to detect my object. However, the image that be show up in screen from webcam is YUY and not RGB.
    This is my resolution for my webcam:
    Resolution webcam:

    Columns 1 through 2

    ‘YUY2_160x120′ ‘YUY2_176x144′

    Columns 3 through 4

    ‘YUY2_320x240′ ‘YUY2_352x288′

    Column 5

    ‘YUY2_640x480′

    I using this code to change to YUY to RGB :
    vid=videoinput(‘winvideo’1,’YUY2_640x480′);
    set(vid,’ReturnedColorSpace’,’rgb’);
    preview(vid);

    But its still same image come out in YUY type. It only change to RGB if :
    getsnapshot(vid);

    But i want in the screen image come out in RGB . Any 1 can help me? i try change webcam wtill the same problem.

  186. jim
    March 20, 2011 at 11:19 pm | #217

    Hi I have Matlab v7.5.0 (R2007b)

    I tried using the following code to connect my webcam to matlab:

    clear all;
    video = videoinput(‘winvideo’,1,’YUY2_352x288′);
    preview(video);
    origimage=getsnapshot(video);

    BUT I get the following error message? (Im not sure if its beacuse I dont have the imaq toolbox)

    ??? Undefined function or method ‘videoinput’ for input arguments of type ‘char’.

    Error in ==> Code_for_WEB_CAM at 4
    video = videoinput(‘winvideo’,1,’YUY2_352x288′);

    anyone know what I can do?
    Thanks!!!

  187. sharad sharma
    March 24, 2011 at 7:51 am | #218

    whenever i type

    imaqhwinfo

    the answer i got is
    ans =

    InstalledAdaptors: {‘coreco’ ‘winvideo’}
    MATLABVersion: ’7.6 (R2008a)’
    ToolboxName: ‘Image Acquisition Toolbox’
    ToolboxVersion: ’3.1 (R2008a)’

    and then when i type
    vid = videoinput(‘winvideo’, 1, ‘RGB24_320x240′);

    i got an error

    ??? vid = videoinput(‘coreco’, 1, ‘RGB24_320x240);
    |
    Error: The input character is not valid in MATLAB statements or
    expressions.

    plz helpme out in getting rid of this error…

    i m using compaq cq62 176tx model…

  188. sally
    March 25, 2011 at 10:05 am | #219

    hello
    please help me i want to build block daigram of fire alarm system with video image using fuzzy logic how i can insert video image in block daigram?
    thank you

  189. eng_giga
    April 6, 2011 at 9:34 am | #220

    hi all,
    if anyone knew how to capture image from video and after 1 second capture another one and then………..
    thanks

  190. shreya pergade
    April 11, 2011 at 7:05 am | #221

    Hi all,
    i’m using webcam to capture the vedio.I want this vedio preview to be shown when i press the button in the gui. Could any one suggest me how can i do this.

  191. oluchi ifeagwazi
    April 14, 2011 at 12:40 pm | #222

    Thank You very much.. useful information.. worked very well

    • hamzah
      April 16, 2011 at 11:43 am | #223

      to oluchi ifeagwazi
      please upload the .m file

  192. P. nilesh
    April 18, 2011 at 11:53 am | #224

    Thnak you very much its going to help me…

  193. Ken Conner
    April 19, 2011 at 10:47 pm | #225

    Hello, I’m using a laptop with a PCMCIA framegrabber card (Imperx VCE-PRO) along with a Zeltom Hilink development board that communicates over RS232. My application is the “Ball On Plate” experiment. The Hilink board controls a pair of servos which enables plate motion and my camera takes images and computes the centroid of the ball location and sends the result to the ball on plate control regulator.

    This application runs in simulink and requires the Image Acquisition and Image Processing Toolboxes along with real time workshop and real time windows target. To compile the simulink block diagram I use: Tools – Real Time Workshop – Build Model and the block diagram fails to compile. Belo is an excerpt of the command line output which shows the following:

    ### Starting Real-Time Workshop build procedure for model: Plant_Gpx_fix
    Warning: Output port 2 of ‘Plant_Gpx_fix/Demux’ is not connected.

    ### Created Real-Time Windows Target module Plant_Gpx_fix.rwd
    C:/PROGRA~1/MATLAB/R2009a/toolbox/rtw/targets/rtwin/openwat/binnt/wlink \
    @C:/PROGRA~1/MATLAB/R2009a/toolbox/rtw/targets/rtwin\rtwin\rtwin.rsp \
    LIBPATH C:/PROGRA~1/MATLAB/R2009a/toolbox/rtw/targets/rtwin\lib;C:/PROGRA~1/MATLAB/R2009a/toolbox/rtw/targets/rtwin\openwat\lib386 \
    NAME ../Plant_Gpx_fix.rwd \
    FILE Plant_Gpx_fix.obj,Plant_Gpx_fix_data.obj,rtGetInf.obj,rtGetNaN.obj,rt_nonfinite.obj,rtwin_main.obj,rt_sim.obj,ext_svr.obj,updown_rtwin.obj,ode3.obj
    Error! E2028: exIMAQAcquireData_ is an undefined reference
    Error! E2028: exIMAQGetLastError_ is an undefined reference
    Error! E2028: exIMAQTerminateSystem_ is an undefined reference
    Error! E2028: exIMAQCreateFVDSystem_ is an undefined reference
    Error! E2028: exIMAQStartSystem_ is an undefined reference
    file Plant_Gpx_fix.obj(C:\Program Files\Hilink\Plant_Gpx_fix_rtwin\Plant_Gpx_fix.c): undefined symbol exIMAQAcquireData_
    file Plant_Gpx_fix.obj(C:\Program Files\Hilink\Plant_Gpx_fix_rtwin\Plant_Gpx_fix.c): undefined symbol exIMAQGetLastError_
    file Plant_Gpx_fix.obj(C:\Program Files\Hilink\Plant_Gpx_fix_rtwin\Plant_Gpx_fix.c): undefined symbol exIMAQTerminateSystem_
    file Plant_Gpx_fix.obj(C:\Program Files\Hilink\Plant_Gpx_fix_rtwin\Plant_Gpx_fix.c): undefined symbol exIMAQCreateFVDSystem_
    file Plant_Gpx_fix.obj(C:\Program Files\Hilink\Plant_Gpx_fix_rtwin\Plant_Gpx_fix.c): undefined symbol exIMAQStartSystem_
    gmake: *** [../Plant_Gpx_fix.rwd] Error 1

    Has anybody had a similar problem when using real time workshop and real time windows target? If so, how can I eliminate this error? I did use imaqreset before initializing the video object. I’m using Matlab R2009a with WinXP Pro 2002 SP3. Any ideas? Thank you in advance.

  194. Parin
    April 23, 2011 at 6:38 am | #226

    Hi can you please give me the code for tracking moving objects in Matlab. Thanks

  195. manju
    April 30, 2011 at 9:48 am | #227

    getsnapshot function does not give the proper image so is there any other command to get actual clear image??

    • Abdul
      October 25, 2013 at 9:47 pm | #228

      Facing same problem. If you find any solution plz forward it to me

  196. blue
    May 10, 2011 at 5:50 pm | #229

    thanks man, you saved me a ton of trouble. :)

  197. hb
    May 13, 2011 at 11:23 am | #230

    hi,iam using a programme of web cam ho save and view an image and do the aquisition with matlab and i need the interface graphique ho do this programme.thank u

  198. ezzahout
    May 13, 2011 at 3:39 pm | #231

    My problem is to track object in motion with single camera, can you help me to do that with source matlab please

  199. Robocon
    June 2, 2011 at 7:13 pm | #232

    Dear Sir
    I’m using Matlab 7.6.0 (R2008a). I already installed Data Acquisition in matlab tools box.
    When I type
    >>imaqhinfo
    This error was showed:
    ??? Undefined function or variable ‘imaqhinfo’.
    I don’t know why. Could you help me?

    • kiki
      August 29, 2011 at 8:30 am | #233

      it’s ‘imaqhwinfo’ not ‘imaqhinfo’

  200. Robocon
    June 2, 2011 at 7:53 pm | #234

    Robocon :
    Dear Sir
    I’m using Matlab 7.6.0 (R2008a). I already installed Data Acquisition in matlab tools box.
    When I type
    >>imaqhinfo
    This error was showed:
    ??? Undefined function or variable ‘imaqhinfo’.
    I don’t know why. Could you help me?

    More information:
    My laptop had integrated webcam. My OS is win7. Thanks before.

  201. hassan elbasri
    June 4, 2011 at 7:26 am | #235

    hi guys i have data and i want to save it using matlab could some one inform me
    and also i how to inter such as name in edite in matlab gui and save it

  202. asdafa
    June 5, 2011 at 1:33 am | #236

    Thanks!

    This help me a lot!

    THANKS! :)

  203. bray
    June 11, 2011 at 1:28 am | #237

    how to capture,
    when I put my id or thumb front of camera
    then capture and fixed it with data
    then if not same with data or picture wich we have then PC will give wrong sound
    then if same with data or picture wich we have then pc will give good sound
    (sorry I’m from Indonesia, my english is bad, and I’m newbie)
    thanks a lot
    u can send to my email
    masnyarosa2@yahoo.com

  204. rini mathew
    July 7, 2011 at 1:00 am | #238

    hey…………i need ur help in writting coding for matlab to detect any friction or movement taking place in a room and to send signals to the piezoelectric sensor………………pls help me i have only 2 weeks of time to complete my project………
    send to my e-mail rini.mat.9@gmail.com

  205. beauty
    July 15, 2011 at 5:04 pm | #239

    hi,
    i am making project on car parking system using matlab 7.6. for that i have to connect my camera with my pc which take an image after 10 min n then analyze it…so can anybody tell me how it happens in matlab that it take an image automatically after 10 min…and plz someone send me a code of that.

  206. beauty
    July 15, 2011 at 5:09 pm | #240

    hi,
    and tell me how to detect car wheels using matlab????

  207. July 26, 2011 at 6:43 pm | #241

    hey thx for those stuff. it was really useful. there is a problem that i am not getting a good rgb image through getsnapshot command as i can through though frame command in running mode. can anyone give me an idea that why is this happening.

  208. July 30, 2011 at 6:09 am | #242

    hi..
    i m using integratet webcam of laptop for matlab.
    There is some problem.pls help me for that problem.
    when i am given this command ,there is no problem
    i.e

    >> imaqhwinfo

    ans =

    InstalledAdaptors: {‘winvideo’}
    MATLABVersion: ’7.0.1 (R14SP1)’
    ToolboxName: ‘Image Acquisition Toolbox’
    ToolboxVersion: ’1.7 (R14SP1)’

    >> info=imaqhwinfo(‘winvideo’)

    info =

    AdaptorDllName: [1x63 char]
    AdaptorDllVersion: ’1.7 (R14SP1)’
    AdaptorName: ‘winvideo’
    DeviceIDs: {[1] [2]}
    DeviceInfo: [1x2 struct]

    but….problem is arise in this command…

    >> vid = videoinput(’winvideo’)
    ??? vid = videoinput(’winvideo’)
    |
    Error: Missing variable or function.

    >> vid = videoinput(‘winvideo’, 1, ‘RGB24_320×240′);
    ??? Error using ==> videoinput.videoinput
    The FORMAT specified is not supported by this device. See IMAQHWINFO(ADAPTORNAME).

    what should i do for this problem?
    pls help me sir.
    thank u.

    • kiki
      August 29, 2011 at 8:43 am | #243

      get the info of its format and resolution
      imaqhwinfo (‘winvideo’);
      dev_info=imaqhwinfo (‘winvideo’, 1) ;
      dev_info.SupportedFormats

  209. Sobi
    September 1, 2011 at 4:09 pm | #244

    Image quality and preview quality are quite different. Please help me out. What can I do to improve my image quality ……..

  210. subramanya vikas
    September 24, 2011 at 5:46 pm | #245

    chaitanya :
    friends i am working on project hand gesticulation recognition. can any body tell me how can i track hand using matlab in video.thankyou…

  211. September 28, 2011 at 6:31 pm | #246

    thank you the stuff.. this is very well done!

  212. Nina
    October 1, 2011 at 12:02 pm | #247

    i wanna 2 ask f i can use fpga that programmed by simulink to analyze image captured by a webcam ???

  213. aisha grema
    October 5, 2011 at 8:48 am | #248

    hi am currently working on my project “motion detection” i am using matlab but i don’t know how to import the webcam to my gui. i want to click on a button and then the camera should load into a window,
    pls if you have any idea help
    thank you.

  214. fatin
    October 11, 2011 at 1:10 am | #249

    how do i start to record the video????????????

  215. kumar
    October 12, 2011 at 5:20 am | #250

    i want to measure speed of object using webcam in matlab can you help me mam

  216. Ummy
    October 22, 2011 at 8:35 pm | #251

    Thanks a Bunch !!! Really helped! I would’ve corrected my issue yesterday if i had read these comments about the imaqreset command but thanks!

  217. sahil jain
    November 2, 2011 at 4:38 pm | #252

    I want to know how PATTERN MaTCHiNG demo work and moreover. how to create system object to create video file. PLease help me it’s urgent
    sahil.jain125@gmail.com

  218. November 4, 2011 at 7:11 am | #253

    Why is it that the image shown looks very redish? Thanks :)

  219. rose
    November 12, 2011 at 9:12 pm | #254

    yes thats what part of my garduation project need plz can u help me through your email ?

  220. Bhuvana
    November 19, 2011 at 11:28 am | #255

    Hello sir/madam

    i want to compare the captured image with image in database,,,can anybody send matlab codings for that..thanku

  221. Vignesh mohan
    November 24, 2011 at 4:38 am | #256

    Here you have explained how to use it with a USB camera. What are the changes I need to make in the code, if I have to use the integrated webcam of my laptop.

  222. November 26, 2011 at 7:53 am | #257

    hi, may I ask which toolbox is suitable for human posture recognition (stand, sit, fall)?
    I am using neuralnetwork toolbox and the results is not very accurate. Thanks!!

  223. karim
    November 30, 2011 at 4:06 pm | #258

    Hi,
    I have to work on a project in matlab which is to write a programe in matlab that compare two images of a person having different resolution and display the out put that the images are of a single person.. please if anyone has the idea do help me..

  224. akhil
    December 9, 2011 at 6:31 pm | #259

    please help me……….
    where can i get this software with crack file for free……..
    plz send me the link to my mail id (akhilsb422@gmail.com)

  225. rayan
    December 12, 2011 at 9:58 am | #260

    how can i capture an image in matlab using DSC-P8 digi cam?

  226. December 25, 2011 at 1:09 pm | #261

    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

    Regard
    Maha Devan.v.s(9940928923)

  227. alm
    February 23, 2012 at 3:58 am | #262

    byye give answers to all these….

  228. keventongco
    March 17, 2012 at 2:52 pm | #263

    i have a project about hand tracking please help me with the project i use matlab nd i dont know how to start.. please help me this is my email address.. keventongco@hotmail,com please anybody help me this depends on our project thanks hope you guys will help me

  229. March 31, 2012 at 6:26 pm | #264

    hello fnd…..myself sneh…student of M Tech..i m extracting vehicle license plate but yet i m unble to extract plate..plz help me..give me matlab code for extract car license plate…

    thanks in advance

  230. liyaqat
    April 1, 2012 at 9:54 am | #265

    >> info = imaqhwinfo(‘winvideo’);
    ??? Undefined command/function ‘imaqhwinfo’.

    what does it mean???

  231. gayatri
    April 6, 2012 at 1:26 am | #266

    hai,good morning.i am also doing project on face recognition in real time.plz send me the code.
    thanx in advance.
    my email id: gayathri.mathurthi@gmail.com

  232. Hafiz
    May 13, 2012 at 3:15 pm | #267

    Hi
    I m using MATLAB 2010a ,It is detecting only laptop camera adaptor ,it is not detecting usb camera adaptor although i can acccess camera in Image acquisition tool box
    kindly guide me

    • saurabh
      June 7, 2012 at 3:26 pm | #268

      you can use interactive way to find installed adapter by using imaqtool command

  233. May 28, 2012 at 1:32 pm | #269

    an ultra-conservative told me 3 years ago that America made a terrible mistake by electing Obama. He swore that, America should have listened to Limbaugh, FNN and Palin. It was nice to hear that ditto heads like him didn’t recognize why they lost.

  234. Aasim
    July 2, 2012 at 4:20 pm | #270

    I am Using Wireless camera, The problem is that each time I get image of the same object, it give the different composition of R,G,B…..
    Please help me out.

  235. jesus
    July 26, 2012 at 1:58 am | #271

    how take a picture automatically?

  236. August 22, 2012 at 10:27 pm | #272

    Great weblog right here! Also your site quite a bit up fast!
    What host are you the use of? Can I am getting your associate link for your host?

    I want my web site loaded up as fast as yours lol

  237. Muhammed Refaat
    August 31, 2012 at 1:31 pm | #273

    great work bro … i wanna ask u something plz .. when i want to save an image using matlab i use the command (imwrite) but if i want to save a sequence of certain images according to some processing and try to use (imwrite) in a loop , every new saved image will overwrite the last one coz i can’t change the name of the saved image .. for ex,
    >>imwrite(A,’name.tif’);
    what shall i do in this prob.

  238. September 18, 2012 at 5:25 pm | #274

    Greetings from California! I’m bored at work so I decided to check out your website on my iphone during lunch break. I love the knowledge you present here and can’t wait
    to take a look when I get home. I’m shocked at how quick your blog loaded on my phone .. I’m not even using WIFI,
    just 3G .. Anyways, great site!

  239. September 22, 2012 at 1:25 am | #275

    Hmm is anyone else having problems with the pictures on
    this blog loading? I’m trying to determine if its a problem on my end or if it’s
    the blog. Any feedback would be greatly appreciated.

  240. October 2, 2012 at 11:12 pm | #276

    Please let me know if you’re looking for a writer for your blog. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d
    absolutely love to write some articles for your blog
    in exchange for a link back to mine. Please send me an email if interested.
    Thanks!

  241. October 3, 2012 at 4:11 am | #277

    You’re so cool! I do not think I’ve read a single thing
    like that before. So wonderful to find another person with a few original thoughts on this topic.
    Really.. thank you for starting this up. This website is something that’s needed on the internet, someone with some originality!

  242. October 5, 2012 at 10:35 am | #278

    Gracias for encouraging me to go do my own my own investigation.
    Yours was way more detailed than mine.

  243. October 6, 2012 at 10:45 pm | #279

    you are actually a just right webmaster. The website loading velocity is amazing.
    It seems that you are doing any unique trick.
    Furthermore, The contents are masterwork.
    you’ve performed a great process on this topic!

  244. October 13, 2012 at 6:10 pm | #280

    Hi my family member! I wish to say that this post is amazing,
    great written and include almost all vital infos. I would like to peer more
    posts like this .

  245. October 20, 2012 at 9:06 pm | #281

    you’re really a just right webmaster. The website loading pace is incredible. It kind of feels that you’re doing any
    unique trick. Furthermore, The contents are masterpiece.
    you have performed a wonderful job in this topic!

  246. October 21, 2012 at 9:29 am | #282

    you’re truly a just right webmaster. The website loading pace is amazing. It seems that you are doing any unique trick. In addition, The contents are masterwork. you have done a great process on this subject!

  247. October 21, 2012 at 6:19 pm | #283

    This paragraph will assist the internet people for building up new weblog or even a weblog from start to end.

  248. October 22, 2012 at 4:04 pm | #284

    Greate pieces. Keep posting such kind of information on your
    page. Im really impressed by your blog.
    Hey there, You have performed a fantastic job. I’ll definitely digg it and for my part suggest to my friends. I am confident they will be benefited from this web site.

  249. ted
    October 23, 2012 at 9:04 pm | #285

    I am using linux. My adaptor name is linuxvideo. When I run vid =videoinput(‘linuxvideo, I get an error message “There are no devices installed for the specified ADAPTORNAME.”

    My webcam is installed in my laptop. I have windows vista but i log remotely to a unix server to access matlab. My device is recognized: InstalledAdaptors: {‘linuxvideo’}
    MATLABVersion: ’7.13 (R2011b)’
    ToolboxName: ‘Image Acquisition Toolbox’
    ToolboxVersion: ’4.2 (R2011b)’

    Thanks.

  250. Zack
    October 30, 2012 at 1:22 pm | #286

    The pectorals are great muscles to build and can add to
    your level of masculinity. * Standing one arm dumbbell presses: This workout mainly focuses your middle deltoid.

    The Wikipedia defines dumbbell as, a type of free weight, a
    piece of equipment used in weight training.

  251. November 22, 2012 at 12:35 am | #287

    Everything is very open with a precise clarification of
    the issues. It was definitely informative. Your site is useful.
    Thank you for sharing!

  252. memo
    November 28, 2012 at 12:59 pm | #288

    ı want bw video in matlab how???

  253. sreekanth
    December 5, 2012 at 5:42 am | #289

    can i get the details of ur cam which u r used????????????
    i have the code but i cant get access to my cam

  254. December 10, 2012 at 10:08 am | #290

    I visited various blogs however the audio quality
    for audio songs present at this site is in fact superb.

  255. December 29, 2012 at 5:31 pm | #291

    When some one searches for his required thing, so he/she needs
    to be available that in detail, therefore that thing is maintained over here.

  256. December 31, 2012 at 5:30 pm | #292

    This is certainly among the most interesting blogs I have
    seen. It’s so easy to get jaded, but there’s truly some first-rate material online, and I believe
    your site is seriously one of them!

  257. teerapong
    January 7, 2013 at 1:36 pm | #293

    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

  258. Siddharth
    January 12, 2013 at 2:55 am | #294

    To all those who are getting the following error :
    Error: The input character is not valid in MATLAB statements or expressions.

    You are getting this error because you have directly copied the code from the website into your command window. Type it out instead of copy-pasting. The error is because of the unrecognised font format of the single quotes i guess.

  259. January 16, 2013 at 10:04 pm | #295

    My partner and I stumbled over here from a different website and thought I might check things out.

    I like what I see so i am just following you. Look
    forward to finding out about your web page for a second time.

  260. saba
    February 2, 2013 at 4:00 pm | #296

    Why is it that the image shown looks very redish? Thanks

  261. saba
    February 2, 2013 at 4:08 pm | #297

    & i want to compare the captured image to a image saved in database, Sir please guide me

  262. February 8, 2013 at 9:15 pm | #298

    I think this is one of the most significant info for me.
    And i am glad reading your article. But wanna remark
    on some general things, The website style is wonderful, the articles is really excellent :
    D. Good job, cheers

  263. February 9, 2013 at 4:14 am | #299

    When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each
    time a comment is added I get four emails with the same comment.
    Is there any way you can remove me from that service?
    Thanks a lot!

  264. February 10, 2013 at 5:42 pm | #300

    This topic is much too complicated for simply 1 article, honestly, I need a great
    deal more if I am going to figure this out. The article was good, but I
    believe there was a good deal that was skipped. Anybody else agree?

    I’m not whining, I just want more, lol!

  265. satya
    February 22, 2013 at 10:38 am | #301

    i want help to find a obstacle from a photograph and that should be compare with another one pls anybody help me soon………….

  266. Hang
    February 22, 2013 at 6:41 pm | #302

    Hello, how can i capture image continuously by using webcam in MATLAB, because now i just can capture one image even a loop is inserted. Can you help me?

  267. Hang
    February 23, 2013 at 5:08 am | #303

    Pls…can some one help me?

  268. nilesh
    February 23, 2013 at 5:18 pm | #304

    how can i create a database for storing images???

  269. March 1, 2013 at 1:43 am | #305

    Amazing :D It’s a real shame more folks don’t know about this place, this article had
    what I needed this morning!!!

  270. March 10, 2013 at 11:23 pm | #306

    Following six months, you need to see major improvement as effectively as your genital warts must be marginal or entirely gone.
    This can be this kind of substantial good to the item, mainly because it relies on organic course of action of recovery how the physique of a human
    has been working with from the time we’ve evolved!Having mentioned that the manual release technique are prefect for owners that operate the collar to perform additional coaching combined with bark manage.Having an oral medication, this is a pretty hassle-free technique of clearing 1′s genital warts.

  271. April 10, 2013 at 1:01 pm | #307

    Someone essentially lend a hand to make severely
    articles I would state. That is the first time I frequented your web page and
    to this point? I surprised with the analysis you made to
    make this particular publish incredible.

    Wonderful job!

  272. May 2, 2013 at 5:40 pm | #308

    Vintage lace is more special as the designs are more intricate and unique and is soft to the touch.
    From couture one-of-a-kind dresses to breezy ready-to-wear styles, these five up-and-coming designers
    represent the next class of high-style designer names to remember.
    Some brides have even been known to walk down their wedding isle
    bare as the day they were born, so any choice of color in wedding gowns for any new bride should be just fine with
    anyone.

  273. May 3, 2013 at 2:07 am | #309

    I am regular reader, how are you everybody?

    This post posted at this site is actually good.

  274. May 7, 2013 at 3:25 am | #310

    Use this mixture over the face as an astringent anytime required.

    Let’s see what they had to say and explore some other homemade beauty care ideas also.

  275. May 14, 2013 at 4:40 pm | #311

    I all the time used to study post in news papers but now as
    I am a user of internet so from now I am using net for posts, thanks to web.

  276. May 23, 2013 at 11:40 pm | #312

    Good day! This post could not be written any better!
    Reading this post reminds me of my previous room
    mate! He always kept chatting about this. I will forward this page to
    him. Pretty sure he will have a good read. Thanks for sharing!

  277. May 29, 2013 at 2:25 am | #313

    I blog quite often and I really thank you for your
    content. This great article has truly peaked my interest.
    I am going to bookmark your blog and keep checking for new information about once a week.
    I subscribed to your Feed as well.

  278. June 5, 2013 at 5:04 am | #314

    Samuels (Eminem) “Nothin’ On You” — Philip Lawrence, Ari Levine, Bruno Mars
    & Bobby Simmons Jr. Not only does a digger realize
    that it’s very possible he might locate a good deal of gold with hardly any trouble, but, worse still, he knows he could work quite difficult without getting any gold at all. After debating the problem and being from the opinion the Government had no chance to reimburse, they submitted the truth on the Crown Law Office for their decision.

  279. Imran Ali
    June 6, 2013 at 6:35 am | #315

    hellow guys following 1 and 2 steps are going well but when i write 3rd step then following error occurs. plz plz plz help me out.

    (1) >> imaqhwinfo

    ans =

    InstalledAdaptors: {‘coreco’ ‘winvideo’}
    MATLABVersion: ’7.8 (R2009a)’
    ToolboxName: ‘Image Acquisition Toolbox’
    ToolboxVersion: ’3.3 (R2009a)’

    (2) >> info=imaqhwinfo(‘winvideo’)

    info =

    AdaptorDllName: ‘C:\Program Files\MATLAB\R2009a\toolbox\imaq\imaqadaptors\win32\mwwinvideoimaq.dll’
    AdaptorDllVersion: ’3.3 (R2009a)’
    AdaptorName: ‘winvideo’
    DeviceIDs: {1×0 cell}
    DeviceInfo: [1x0 struct]

    (3) >> info=imaqhwinfo(‘winvideo’,1)
    ??? Error using ==> imaqhwinfo at 136
    There is no device with the specified DEVICEID.

  280. cialis kuala lumpur
    June 19, 2013 at 11:58 am | #316

    Apart from stress, there is also the matter of
    diet and lifestyles. It is often referred to as impotence, which actually includes all of the above mentioned sexual problems along with erectile problems.
    The majority of available penis pills are made from
    a blend of natural ingredients, herbs, vitamins and herbal supplements that stimulate the growth of safe and effective.

  281. July 13, 2013 at 4:12 am | #317

    I Proceed hearing to the news speak just about acquiring free of
    charge on-line grant applications so I have been hunting about for the optimal web site to receive a single.

  282. July 19, 2013 at 2:09 am | #318

    Thankfulness to my father who shared with me regarding this blog, this web site is genuinely amazing.

  283. July 26, 2013 at 7:26 pm | #319

    Usually I don’t read article on blogs, but I would like to say that this write-up very forced me to check out and do it! Your writing taste has been amazed me. Thanks, very great article.

  284. saaj
    August 21, 2013 at 4:04 pm | #320

    how to capture the image from the laptop webcam in matlab…..??????

  285. vladloz
    October 14, 2013 at 12:50 pm | #321

    Maybe someones knows:
    When making any operation from command window (for exaple cycle for) preview stops till it’s finish.
    How can I run and preview at the same time?

  286. Shruti
    October 19, 2013 at 7:53 am | #322

    i want to interface external webcam to my laptop, but problem is that i does not find the name n id of the wxternal web cam . plz give suggestion

  287. Shruti
    October 19, 2013 at 7:54 am | #323

    plz rpl as early as possible

  288. October 30, 2013 at 2:53 am | #324

    constantly i used to read smaller content that as well clear their motive,
    and that is also happening with this piece of writing which I am reading now.

  289. sumanth
    December 24, 2013 at 8:30 am | #325

    can any one help me how to coding in matlab by using a mathematical equation and give one example

  290. Sumathi
    January 6, 2014 at 6:56 am | #326

    Hi, This above’ Image capture using Webcam in Matlab’ step is very used for me.When I follwed this step, now I can easily captured my image from webcam. This is very usefu for me…Thank You

  291. Sumathi
    January 6, 2014 at 6:59 am | #327

    Sumathi :
    Hi, This above’ Image capture using Webcam in Matlab’ step is very used for me.When I follwed this step, now I can easily captured my image from webcam using matlab command. This is very useful for me…Thank You

    • Sumathi
      January 6, 2014 at 7:05 am | #328

      Hi, This above’ Image capture using Webcam in Matlab’ step is used for me.When I followed this step, now I can easily captured my image from webcam using matlab command. This is very useful for me…Thank You

  292. January 23, 2014 at 5:44 am | #329

    hai,
    plz send me video recoding program for matlab
    plzzzzzzzzzzzzzzzz send me

  293. Andrew
    February 10, 2014 at 4:22 pm | #330

    Hi my fyp z regarding real time motion detection camera and auto panning system ..and i m working it in matlab.. Plz if some one have code and data which can help me and sure can save my time regarding this project…plz mail me at khani17@yahoo.com
    wating for ur reply

  294. ravi
    February 12, 2014 at 7:52 am | #331

    hai i am doing project on image processing i want to know how to take input video file from any drive without using webcamera pls reply me yo mravi077@gmail.com

  295. March 3, 2014 at 11:32 am | #332

    We will be setting up a bridged VPN since we want complete access for our roadwarriors.
    The actual number of private dealers and coin shops
    has been steadily decreasing and the remaining shops have focused their sales on
    gold and silver. # This config item must be copied to # the client config file
    as well.

  296. vinoth
    March 20, 2014 at 7:21 am | #333

    hi, i type imaqhwinfo(‘winvideo’)

    but an error which is “invalid mex file and not valid win32 application

    plz hlp me

  1. August 22, 2009 at 7:53 am | #1
  2. November 11, 2010 at 5:21 pm | #2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 32 other followers

%d bloggers like this: