If you want to install OpenCV in ubuntu, the clearcut explanation is provided here:
The installation is explained here:
The use of opencv library to create a sample application in eclipse has been described here
Things to know:
1. The installation of opencv will create include files in /usr/local/include and library files in /usr/local/lib
2. Since /usr/local/include location is already included by eclipse, so we do not need to include it. But the library files need to be included as explained in the second link above.