Installation+mexopencv

Mexopencv is a software package that provides Matlab mex functions that interface over a hundred of OpenCV functions. You can find it [|here]. For a full list of supported OpenCV functions, see [|this] page.

Installation is easy, just follow these steps (assuming that you already installed OpenCV).

1. Make a directory where you want to install mexopencv code mkdir  cd  code 2. Get the source-corde using git. If git is not installed yet, get it from the repository. code git clone git://github.com/kyamagu/mexopencv.git code 3. Compile the code, make sure that your Matlab directory is given correctly. This is needed because the Makefile uses the mex compiler. code cd mexopencv make MATLABDIR=/usr/local/MATLAB code 4. Thats it. To use this functions make sure that the path is included in Matlab. This is easily done in the Matlab command window: code addpath('/mexopencv') code 5. Now you can use all the functions in Matlab. For example to rescale an image: code % Set the resize factor resize_factor = 0.8; % Read an input image using Matlab input_image = imread('image_name'); % Rescale the image using OpenCV resized_image = cv.resize(input_image, resize_factor); code