You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.7 KiB

This code implements the simulation results reported in:

M. W. Spratling (2016), A neural implementation of the Hough Transform and the advantages of explaining away, Image and Vision Computing, 52:15-24.

Please cite this paper if this code is used in, or to motivate, any publications.


USAGE


This code was tested with MATLAB Version 8.5.0.197613 (R2015a), the Image Processing Toolbox (Version 9.2), and the Statistics and Machine Learning Toolbox (Version 10.0) running on Ubuntu Linux version 14.04. It also uses the third-party VLFeat Toolbox (http://www.vlfeat.org/) for SIFT keypoint detection. These toolboxes should thus be installed somewhere on your matlab path. To run the experiments on car detection, it is necessary to install the UIUC dataset (https://cogcomp.cs.illinois.edu/Data/Car/). The first line of the function "load_image_car" should be modified to contain the path to this dataset.

The following MATLAB functions can be used to perfom the experiments described in the paper.

Figs. 1 to 5 can be reproduced using the command:

    test_hough_lines(f);

where f is an integer between 1 and 5 corresponding to the figure number of the experiment (note that in Figs 4 and 5 the input images are randomly generated, so will not look identical to those in the article).

The precision recall curves in Figs. 4 and 5 can be reproduced using the command:

    stats_hough_lines(imNoise);

where imNoise=0 for Fig. 4 and imNoise=0.01 for Fig. 5.

Fig. 7 can be reproduced using the command:

    accuracy_hough_lines;

For Fig. 8 it is necessary to generate a codebook using the following command:

    train_ism('cars');

The precision recall curve can then be generated by running:

    stats_ism_cars;

Detection results for individual images can be generated using

    test_ism_cars(imageNum);

where imageNum is the number of the image in the test set that is to be processed.

For Fig. 9 it is necessary to generate a codebook using the following command:

    train_ism('carsScale');

The precision recall curve can then be generated by running:

    stats_ism_carsScale;

Detection results for individual images can be generated using

    test_ism_carsScale(imageNum);

where imageNum is the number of the image in the test set that is to be processed.