I currently have opencv 2.4.1 on my rapsberry pi and have been looking for a way to upgrade it to 2.4.10 which is the latest stable release. Will I have to do a fresh install or is there a way to upgrade it?
You will have to download the source and compile:
wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.10/opencv-2.4.10.zip
The instructions for linux from the docs are basically:
Create a temporary directory, which we denote as <cmake_binary_dir>, where you want to put the generated Makefiles, project files as well the object files and output binaries.
Enter the <cmake_binary_dir> and type
cmake [<some optional parameters>] <path to the OpenCV source directory>
For example
cd ~/opencv
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
Enter the created temporary directory (<cmake_binary_dir>) and proceed with:
make
sudo make install
There is a thorough tutorial for ubuntu 14.04 that may also be useful.