Jianxiong's Functions for Computer Vision

Jianxiong Xiao

MIT Computer Vision Group
Computer Science and Artificial Intelligence Laboratory
Department of Electrical Engineering and Computer Science
Massachusetts Institute of Technology

SUN Database SUN Classification Benchmark SUN360 Panorama SUN Primitive SUN Memorability

Index to Code Sections

The complete set of these functions is available as a zip file JianxiongFns.zip
  • How to cite this site
    J. Xiao, 2012. Jianxiong's Functions for Computer Vision.
    Available from: <http://mit.edu/jxiao/fns>.
  • BibTeX entry
  • @misc {JianxiongFunctions,
    author = "Jianxiong Xiao",
    title = "Jianxiong's Functions for Computer Vision",
    note = "Available from: \url{http://mit.edu/jxiao/fns}",
    year = "2012",
  • Disclaimer
    These functions are NOT rigorously tested and may contain bugs. Please do NOT use them without rigorous testing for any life critial applications!
  • MIT License
  • Can't find what you want here? Have a look at
    Peter Kovesi's MATLAB function website and other sites he listed


Computer Vision is an experimental science that requries significant amount of engineering efforts. I am lucky enough to start my research career in an era that more and more researchers making their code avaialble online. Among many other useful resources, I found that Peter Kovesi's MATLAB function website is particularly useful to my research. As one of the biggest fans of Peter's website, and a big believer of open data and source code, I am very eager to do something to contribute back to the community and make the life of other researchers easier. The goal of this website is along the same line of Peter's website, i.e. to provide small functions that are useful and non-trivial to implement for fast-prototyping in computer vision research and engineering. The functions provided in this page are some small atoms that I wrote for my research projects, and they are complimentary to Peter's functions. The list of provided functions will also increase in the future, when I have time to isolate and pack my codes, or when I write some new ones.

Please report any bugs and/or suggest enhancements to .

Jianxiong Xiao


To use most of these functions you will need MATLAB and the MATLAB Image Processing Toolbox. You may also want to refer to the MATLAB documentation and the Image Processing Toolbox documentation. Alternatively you may be able to use Octave which is an open source alternative to MATLAB. But none of the functions on this page are tested on Octave. See Peter Kovesi's Notes on using Octave.

C++, Python and Javascript

Some of these functions use C++, due to the consideration of speed. They are tested in gcc or Matlab MEX. Some of these functions use Python, mostly because we want to run it easily as CGI service in a web server. Some of these functions use Javascript, because we want to run it in a Web browser.

Uniform Grid on 3D sphere by Subdividing Icosahedron