Skip to content
Franz Graf edited this page Apr 18, 2015 · 8 revisions

Contact

Discussions and announcements can be found at the according Google Group.

LIRE

Unfortunately LIRE is not available in Maven. To get Lire compied together with JFeatureLib, just clone the LIRE Fork from https://github.com/locked-fg/LIRE and install it in your local MAVEN repository:

git clone https://github.com/locked-fg/LIRE.git
mvn -Prelease install -DskipTests=true -Dgpg.skip=true

Java Platform

The minimum required Java version is currently Java 7.

Code Style

The basic code style is the default style which is proposed by a fresh NetBeans installation. Just hit Alt+Shift+F for auto-formating once in a while (especially before checking in!).

  • 1 Tab should expand to 4 spaces
  • UTF-8 encoding should be used throughout the whole project (Eclipse defaults to your OS-setting)
  • For loops and conditionals, open the bracket in the same line as the loop/if statement and always use brackets.

new Image Features

Image Features should be placed in the package de.lmu.dbs.features and must implement de.lmu.dbs.features.FeatureDescriptor or extend de.lmu.dbs.features.FeatureDescriptorAdapter. It is recommended to extend FeatureDescriptorAdapter as deprected methods find a default implementation there before they will be removed from the API.

new Descriptors/Detectors

For each new descriptor (e.g a new GrayLevelHistogram for a running example), please check the following steps:

  • Place the class implementing FeatureDescriptor directly in the package de.lmu.dbs.features and give it a reasonable name using CamelCaseNotation. Do not mind if the name is a bit longer. Just avoid names like CoGLHist instead of CombinedGrayLevelHistogram.
  • If the descriptor requires additional classes which you do not want to keep as inner classes, create a package with the same name like de.lmu.dbs.features.combinedGrayLevelHistogram and place all additional classes in there.
  • Try not to use classes from other descriptors! This quickly leads to unmaintainable all-to-all dependencies. Either copy the according class or request to extract a super class which might be put in de.lmu.dbs.utils.
  • Use the strictest possible access modifiers for your classes, methods and fields.
  • Never return instances of [classes](http://download.oracle.com/javase/tutorial/java/javaOO/nested.html nested/inner). As they always keep an implicit reference to the surrounding class, you might be producing memory leaks as the outer class cannot be garbage collected as long as the inner class instance lives. If you think you have to return such a class, you should have good reasons ;)
  • Avoid System.out.println() statements but use the java logging framework.

For documentation purposes, add an entry to the FeaturesOverview page including:

  • Class Name of the class implementing (Multi)FeatureDescriptor
  • What is the aim of the descriptor/detector
  • Link to a ressource from where you have taken the definitions (wiki, publication, bibtex, etc).
  • If all the information above is given in the JavaDoc of the according class, just link to the file.
Clone this wiki locally