Creating the project and typing in the code is trivial. But the main thing is this. Create a folder within the workspace, (preferably called includes) and copy all the header files that will be included.
Then, another folder called 'dll' can be created containing all the dlls within the workspace. But the main step is the setting up of the project properties.
so the steps are as follows:-
Now here we go to Project properties and set the directories, to the includes directory. Here we set the directory under the GCC C++ Compiler flag.
Next go to the MinGW C++ Linker where we set up the names of the libraries and the library search path. This should be enough to get the OpenCV project get going.