0

I'm working on a university computer so I have no administrative privileges and I can't install any software. For my machine learning class we were allowed to use "any existing libraries" to try and classify 1440 images into 18 different categories.

I wished to train 18 separate models - one for each category - then use some ensemble method to combine their outputs. To save me the trouble of writing these models I had hoped to use OpenCV and implement a basic off-the-shelf facial recognition algorithm.

The problem is - OpenCV is not on the computer and I'm not sure how to get it. Reading the documentation simply provides me with apt-get install libopencv-dev or worse:

cd ~/<my_working _directory>
git clone https://github.com/Itseez/opencv.git
cd ~/opencv
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install

Obviously I don't have access to the sudo command.

Is there any way to gain access to OpenCV's functionality without administrative privileges? I was hoping I could make a folder in my working directory with all the libraries then just call it.

One more little stepping stone - I'm working in Python, so I need to use the Python bindings for OpenCV. I know that it's possible to import a module from a subdirectory (a la Import a module from a relative path), so I just need to find a way to get the OpenCV python module in a subdirectory and in working condition.

Community
  • 1
  • 1
stevendesu
  • 15,753
  • 22
  • 105
  • 182

1 Answers1

2

Instead of

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. make sudo make install

do

cmake-gui

Then change CMAKE_INSTALL_PREFIX to directory where you can write. Also you can enable INSTALL_PYTHON_EXAMPLES. Do Configure and Generate, then

make
make install

OpenCV will be installed to the specified local folder.

old-ufo
  • 2,799
  • 2
  • 28
  • 40
  • I'm trying this now - it's taking a long time to run `git clone`. Will respond with success or failure whenever it's done – stevendesu Nov 15 '13 at 15:16
  • Git is not neccesary, you can just download sources from the http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.7/opencv-2.4.7.tar.gz/download – old-ufo Nov 15 '13 at 15:19
  • I actually don't know that I can use `cmake-gui`. I'm accessing the remote computer through PuTTY. Tarball just finished extracting. Just tried. `cmake` and `cmake-gui` returned "Command not found.` - there was a binary in the opencv directory called cmake, so I tried `./cmake` and got "Permission denied." – stevendesu Nov 15 '13 at 15:34
  • University computer without cmake sound very weird...I don`t know how to help you with such unlucky situation, may be try to download cmake linux binaries http://www.cmake.org/cmake/resources/software.html , copy them to the your folder and execute the, – old-ufo Nov 15 '13 at 15:40
  • Permission denied =( Guess I'm going to have to compile and run on my personal computer... – stevendesu Nov 15 '13 at 15:57