Thursday, January 21, 2010

Configuring OpenCV2.0 In Visual Studio 2005

After some googleing I fount that the OpenCV 2.0 binaries are compiled for the MinGW Rather than Visual Studio. So to work OpenCV in visual Studio We have to compile the source for vs2005. for that we will need the software cmake2.4 and you can download and install it and download the cmake2.0.exe. after that you ve to compile it and build it.
But Luckily I found a blog that gives the vs2005 compiled version of the OpenCV 2.0. and you can download it from here. OpenCV-win32-vs2005.exe. thanx to Zerm.
  Okay.. I f you downloaded it ,install it . Then take the visual studio and go to
Tools > Options and click the 'vc++ Directories' in the 'Projects and Solutions' Option and In the Drop down list of the 'Show Directories'  and Select it as Include Files and add this line to it
C:\Program Files\OpenCV2.0\include\opencv 
Then Select 'Library Files' and Add this
C:\Program Files\OpenCV2.0\lib
Then Select the 'Source File' and Add this Lines
C:\Program Files\OpenCV2.0\src\cv
C:\Program Files\OpenCV2.0\src\highgui
C:\Program Files\OpenCV2.0\src\cxcore
C:\Program Files\OpenCV2.0\src\ml
Now the Configuration is almost done . Now try a simple the sample code.


#include "stdafx.h"
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"

int _tmain(int argc, _TCHAR* argv[])
{
    IplImage *img = cvLoadImage("Image.bmp");
    cvNamedWindow("Image:", 1);
    cvShowImage("Image:", img);

    cvWaitKey();
    cvDestroyWindow("Image:");
    cvReleaseImage(&img);

    return 0;
}
Before Debugging it go to the  Project>>Properties>>Configuration Properties>>Linker>>Input and add the lib like this in the above snapshot. Now debug the project a prompt.It will run. This is the simplest and efficient way to get opencv Work in VS2005.
Or If you want the complex Procedure You can Follow this Link to compile the Opencv with cmake and all the stuffs click here
Read More

Wednesday, January 6, 2010

How to make Hp Webcam working in Ubuntu 9.04


I am writing this article with myown experience. I was also searching for this webcam drivers all the time and I got many sites and forms telling how to make it work. but all those are not working with me. Every time I download a source and compile it I was only getting errors. and at last I got a simple way. the screenshots of the webcam working in my hp pavlion dv2918 is here.

 What I did is
1)     take synaptic synaptic package manager(System >> Adminstration>>            synaptic package manager)
2)    Reload

3) Select Cheese

4) Mark and apply. The software and driver should be installed.
Or
take terminal and type
$sudo apt-get update
$sudo apt-get install cheese
Then take the application from Application>>Graphics>> cheese Webcam Booth
Read More
Powered By Blogger · Designed By Seo Blogger Templates