Monday, April 19, 2010

Install OpenCV 2.1 for Microsoft Visual Studio 2008

Install OpenCV:

Configure Visual Studio:

  1. Open VC++ Directories configuration: Tools > Options > Projects and Solutions > VC++ Directories
  2. Choose "Show directories for: Include files" then Add "$openCVDir\include\opencv"
  3. Choose "Show directories for: Library files" then Add "$openCVDir\lib" (*.lib and *.dll files)
  4. Choose "Show directories for: Source files"
    Add "$openCVDir\src\cv"
    Add "$openCVDir\src\cvaux"
    Add "$openCVDir\src\cxcore"
    Add "$openCVDir\src\highgui"

Configure your Project:
After you've created a project you'll need to add the OpenCV dependencies.
Open Project Properties: Project > %projectName% Properties...
Open Linker Input properties: Configuration Properties > Linker > Input
Open the "..." window to edit "Additional Dependencies" and on each line put:
"cv210.lib"
"cxcore210.lib"
"highgui210.lib"

"ml210.lib"

"opencv_ffmpeg210.lib"

And any other lib file necessary for your project
Your project should now build. If you get any errors try restarting Visual Studio and then doing a clean Rebuild.

Friday, February 5, 2010

Bet and Win


... yanlis ata oynamaz, ama at yanlis yapabilir.

... will not bet on the wrong horse, but the horse may do wrong.

Wednesday, February 3, 2010

Monday, January 11, 2010

Running OpenCV using Microsoft Visual Studio 2008




Setting Global Options:


  • Go to Tools => Options



  • Then, Project and Solutions => VC++ Directories => Library files. Set the directories as shown in image



  • Project and Solutions => VC++ Directories => Include files. Set the directories as shown in image.


Creating a new project:




  • File => New => Project


  • In Project Types, select Win32. In Templates, select Win32 Console Application. Give a name for your project right next to "Name:" and click "OK".


  • Click "Next" in the next window


  • In the "Application Type", select "Console Application". Select "Empty Project" in additional options. Then click "Finish".


  • Right click on "Source Files", click Add => New Item.


  • Under Categories click on "Code", then under templates click on "C++ File". Then give a name for your *.cpp file.


  • From the top menu click on Project => Properties (Alt + F7).


  • Go to Configuration Properties => Linker => Input and under additional dependencies add cv200.lib, highgui200.lib, cxcore200.lib, cv200d.lib, highgui200d.lib, cxcore200d.lib


  • Compile (Ctrl + F7)


  • Build (F7)


Question: I'm developing a C++ command-line application in Visual Studio and need to debug it with command-line arguments. At the moment I just run the generated .exe file with the arguments I need (like this program.exe -file.txt) , but this way I can't debug. Is there somewhere I can specify the arguments for debugging? Thanks a lot.



Answer: Yes, it's on the Debugging section of the properties page of the project. In VS 2008, right click the project, choose properties, go to the Debugging section -- there is a box for command line arguments.















Friday, December 11, 2009

TTech Proxy address for ie

LAN Settings
10.200.125.200:80

Thursday, December 10, 2009

Using Microsoft Visual Studio for Simple C Programs

A free version of Microsoft Visual C++ Express is available in:
http://msdn2.microsoft.com/en-us/express/aa700735.aspx

To edit your C program:

From the main menu select File -> New -> Project

In the New Project window:
- Under Project types, select Win32 - Win32 Console Application
- Name your project, and specify a location for your project directory
- Click 'OK', then 'next'

In the Application Wizard:
- Select Console application
- Select Empty project
- Deselect Precompiled header

Once the project has been created, in the window on the left hand side you should see three folders:
- Header Files
- Resource Files
- Source Files

Right-click on Source Files and Select Add-> New Item
Select Code, and give the file a name
The default here will be a file with a *.cpp extension (for a C++ file). After creating the file, save it as a *.c file.

To compile and run:

Press the green play button.
By default, you will be running in debug mode and it will run your code and bring up the command window.
To prevent the command window from closing as soon as the program finishes execution, add the following line to the end of your main function:
getchar();
This library function waits for any input key, and will therefore keep your console window open until a key is pressed.

Followers