Adds common clases.

parent ce5b0810
package com.aluxoft.earrecognition;
import java.util.HashMap;
/**
* Created by josejuliomartinez on 06/10/15.
* The database of all the ears.
*/
public class EarDatabase {
private HashMap<String, Person> persons = new HashMap<String, Person>();
public void addPerson(Person person) {
this.persons.put(person.getIdentifier(), person);
}
}
package com.aluxoft.earrecognition;
/**
* Created by josejuliomartinez on 06/10/15.
* Store the features of the ear.
*/
abstract public class EarFeature implements Comparable {
}
package com.aluxoft.earrecognition;
/**
* Created by josejuliomartinez on 06/10/15.
*/
public class EarIdentifier {
private EarDatabase database;
public EarIdentifier(EarDatabase _database) {
this.database = _database;
}
public void setDatabase(EarDatabase _database) {
this.database = _database;
}
/**
* Do the ear identification process.
* @param feature The result of the identification.
* @return
*/
public EarIdentifierResult identify(EarFeature feature) {
return null;
}
static {
System.loadLibrary("opencv_java");
System.loadLibrary("nonfree");
}
}
package com.aluxoft.earrecognition;
/**
* Created by josejuliomartinez on 06/10/15.
* Stores the result of an identification (top10)
*/
public class EarIdentifierResult {
}
package com.aluxoft.earrecognition;
import java.util.ArrayList;
/**
* Created by josejuliomartinez on 07/10/15.
*/
public class Person {
private String identifier;
private String name;
private ArrayList<EarFeature> features = new ArrayList<EarFeature>();
public String getIdentifier() {
return identifier;
}
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void addFeature(EarFeature feature) {
this.features.add(feature);
}
}
package com.aluxoft.earrecognition.loader;
import com.aluxoft.earrecognition.EarDatabase;
/**
* Created by josejuliomartinez on 07/10/15.
* Loads the database.
*/
abstract public class EarDatabaseLoader {
public abstract EarDatabase load();
/**
* Updates the database (only implemented if we can update the database)
* @param database
*/
public void update(EarDatabase database) {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment