Skip to content
Mehmet Agaoglu edited this page May 11, 2020 · 22 revisions

Downloading the files

Follow this option if you want to download the files and experiment for your own purposes, but do not intend on contributing back features/improvements to our code base.

  1. Go to the ReVAS repository GitHub page and press the green "Clone or download" button, followed by "Download ZIP".
  2. Open the files in MATLAB. This requires an installation of Matlab and a license to use Matlab.
    • The following toolboxes may be required for using ReVAS:
      • Curve Fitting Toolbox
      • Image Processing Toolbox
      • Optimization Toolbox
      • Parallel Computing Toolbox
      • Signal Processing Toolbox
      • Statistics and Machine Learning Toolbox

Setup ReVAS

  1. Navigate Matlab so that your downloaded/cloned ReVAS directory is the current directory, and it indicates as such.
  2. In the Command Window, run the InstallRevas.m function. This will add necessary folders to Matlab path, and also compile some third-party dependencies.
  3. Finally, refer to the demo/DemoScript.m script to see how the functions/modules are invoked and how a video can be sent through the pipeline with your desired parameters. See the GUI Overview and Workflow pages for more information about using the GUI.

How to contribute

Follow this option if you want to contribute back features/improvements to our code base, or if you want to use git to track your own changes.

  1. Go to the ReVAS repository GitHub page and "Fork" the repository to your own GitHub account.
  2. Looking at your repository now (yourusername/ReVAS NOT lowvisionresearch/ReVAS), press the green "Clone or download" button, select the text, open your terminal, and type git clone followed by the pasted text.
  3. If you are new to git, the data structures course at Berkeley has an excellent reference that explains how to use it. Standard practice is to make a commit with a descriptive message for every functional change you make.
  4. If you want to contribute your pushed commits back to the main lowvisionresearch/ReVAS repository, you can make a pull request, which is a request to merge your code back in. Your request will have to be approved before it takes effect, and edits may be requested before approval. Please make sure (a) you follow the Module Guidelines when creating a new module, (b) when you run RunTesters.m after your edits, all tests pass.

Mex File Compilation

It is possible that the provided files need to be recompiled for your computer. This is taken care of by InstallRevas.m function. If you already ran that without any error/failure messages, then stop here because ReVAS is ready to use for you. If not, this can also be accomplished by running the make mex command from the root of the repository in a terminal. (Note that make mex assumes the prerequisites in step 0 below are fulfilled already.) You can also do this process yourself manually as follows: To run, follow these steps:

  1. Computer Vision Toolbox OpenCV Interface is a required add-on for compilation. You also need a compatible compiler: (see troubleshooting for more information)

    • Windows 64 bit: MS Visual Studio 2017 or MS Visual Studio 2015
    • Linux 64 bit: gcc-6.3 and above (g++)
    • Mac 64 bit: Xcode 9.0.0 and above (Clang++)
  2. Change your current working folder to third_party/visionopencv/TemplateMatching where source file matchTemplateOCV.cpp is located.

  3. Compile the MEX-file from the source file by running in the command window:

mexOpenCV matchTemplateOCV.cpp
  1. Verify that it works by running the test script testMatchTemplate.m located in the same directory.

  2. The GPU version can be compiled similarly, except that the file is compiled via

mexOpenCV matchTemplateOCV_GPU.cpp -lgpu -lmwocvgpumex -largeArrayDims

on PC, or

mexOpenCV matchTemplateOCV_GPU.cpp -lmwgpu -lmwocvgpumex -largeArrayDims

on Linux/Mac. A GPU is required to compile the GPU version. The test script for this is testMatchTemplateGPU.m.

Troubleshooting Mex File Compilation

  • If mexOpenCV is undefined, ensure the pre-built OpenCV libraries which are shipped with the Computer Vision System Toolbox is installed. This can be done by typing visionSupportPackages into the command window of Matlab, and installing the Computer Vision Toolbox OpenCV Interface add-on.
  • If you are missing a compatible compiler, ensure you have one of the following:
    • Windows 64 bit: MS Visual Studio 2017 or MS Visual Studio 2015
    • Linux 64 bit: gcc-6.3 and above (g++)
    • Mac 64 bit: Xcode 9.0.0 and above (Clang++)
  • If you need additional help with setting up a compatible compiler, please view the related Matlab support pages:
Clone this wiki locally