How to grab the image using the Microsoft LifeCam Studio and OpenCV libraries.

This blog illustrates the way to develop a software to grab the image using the web camera of Microsoft LifeCamStudio and OpenCV libraries.

I have grabbed the image successfully.


[Environment of the development]

Compiler: Microsoft Visual Studio 2010Ultimate
OpenCV: 2.43



#include "stdafx.h"

#include <iostream>
#include <sstream>
#include <Windows.h>
#include <opencv2/opencv.hpp>

using namespace cv;

int main(void)
{

 VideoCapture cap(0);
 if(!cap.isOpened() )
 return -1;

 while(1){

  Mat frame;
  cap >> frame;

  imshow("image", frame);
  if( waitKey(30) >= 0 ) break;
 }


 return 0;

}

Comments

Popular posts from this blog

メールクライアントソフトBecky!の表示フォントを変更

Microsoft プロダクトキーの種類