Skip to content
Matthew Sit edited this page Sep 13, 2019 · 22 revisions

Installation of the standalone application

Follow this option if you are not familiar with Matlab and want to use ReVAS as-is. Matlab installation not required. Provides a graphical user interface (GUI) and requires no code writing/handling.

  1. Download the installation .zip file corresponding to your operating system.

  2. A ReVAS installer should appear in your downloads; open it and wait for the installer to load. You will be brought to the ReVAS Installer window.

  3. Follow the instructions on the installer. If successful, your ReVAS tool should start downloading.

  4. When the download is finished, you should see the following window.

  5. To start up ReVAS, navigate to the folder where you installed ReVAS. From that folder, the path to the application should be `SELAB > application > ReVAS'. Double-click on the ReVAS application to launch the ReVAS tool.

See the GUI Overview and Workflow pages for more information about using the GUI.

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 university has licenses available for UC Berkeley affiliates, more information here and here.
    • During installation, you will have the option to select toolboxes to install. The following toolboxes may be helpful and/or required for developing with ReVAS:
      • Curve Fitting Toolbox
      • Image Processing Toolbox
      • Optimization Toolbox
      • Parallel Computing Toolbox
      • Signal Processing Toolbox
      • Statistics and Machine Learning Toolbox

Cloning the repository

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.

Getting Started with Matlab

If you're unfamiliar with the Matlab environment, you can get started by...

  1. Navigate Matlab so that your downloaded/cloned ReVAS directory is the current directory, and it indicates as such.
  2. In the Command Window, and all nested directories to the path by running the command addpath(genpath(pwd)).
  3. Finally, refer to the example demo/SampleRunner.m script to see how the functions/modules are invoked and how a video can be sent through the pipeline with your desired parameters.

Mex File Compilation

It is possible that the provided files need to be recompiled for your computer. This can be accomplished by running the make mex command from the root of the repository in a terminal. You can also do this process yourself manually as follows: To run, follow these steps:

  1. Change your current working folder to third_party/visionopencv/TemplateMatching where source file matchTemplateOCV.cpp is located.

  2. Compile the MEX-file from the source file by running in the command window: mexOpenCV matchTemplateOCV.cpp

  3. Verify that it works by running the test script testMatchTemplate.m located in the same directory.

  4. 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

  • 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