Friday, May 5, 2017

Image processing with Matlab : (2) (adaptors info ,Take photo from webcam)

Basic image processing functions:  
  • imaqhwinfo()
This will return the information about all the adaptors available on the system.






     





Suppose if  you want to preview your webcm then type




  • vid = videoinput ('winvideo',1);
  • preview (vid)














Take photos from your webcam 



  • vid=videoinput('winvideo',1);
  • I=getsnapshot(vid);
  • save data

Take 10 photo from webcam and rename them in your formate


  • vid=videoinput('winvideo',1);
  • for i=1:10 

         I=getsnapshot(vid);
         Fname=['Image',num2str(i),'.jpg'];
         imwrite (I,Fname,'jpg');
         pause(1);
     end

No comments:

Post a Comment