From BoofCV
Jump to navigationJump to search

Development with BoofCV

The following manual provides an introduction to development with BoofCV. It is assumed that the reader is familiar with development in the Java programming language and the basics of computer vision. This manual primarily takes the form of tutorials. However, before going through the tutorials one should be familiar with coding standards use in BoofCV. Once these are understood one will be able to efficiently search the library or even guess the names of classes which are needed.

Coding Standards

One of the primary reasons Java was selected as a programming language for this library are the set of development tools available for Java. Less restrictive and structured languages such as C/C++ essentially allow the developer to redefine much of the language on the fly. While at first this sounds like a positive characteristic, it has hindered the ability to create development tools which allow refactoring and other modern techniques. BoofCV's API has been designed to take full advantage of integrated development environments (IDE) such as IntelliJ and Eclipse.

Unfortunately Java does not provide templates. For example, if two classes are identical in every respect except that they use different primitive data structures internally in Java you need to create to classes. In languages such as C++ you can create one template class. The later is easier to maintain and requires less code. To get around this issue auto code generation is extensively used throughout the library.

A common pitfall which developers fall into is over abstraction. This leads to code which is difficult to use or develop because of its complexity and layers of abstraction. Computer vision has many complex algorithms and competing ideologies on how to catalog these algorithms together. To mitigate this issue the code in BoofCV has been divided into algorithms and abstractions. Code inside of algorithms has minimal abstraction and is implemented in whichever way makes the most sense to that particular algorithm. Abstraction containers generalized interfaced and wrappers around the algorithms so that they fit that particular formalism. This also greatly reduces unnecessary dependencies between the code allowing pieces of BoofCV to be cut off and used independently.



Directory Structure

Class Name Standards

List of Tutorial

Building BoofCV