public class CityLandscapeUtilities extends Object
Constructor and Description |
---|
CityLandscapeUtilities() |
Modifier and Type | Method and Description |
---|---|
static org.openimaj.classifier.citylandscape.RecordDetail[] |
classifyImage(ArrayList<Double> query,
int k,
int mode)
Takes query vector to compare with integer k images from the training set
|
static ArrayList<Double> |
getImageVector(String imageName)
Returns an ArrayList
|
static String |
getOutput(org.openimaj.classifier.citylandscape.RecordDetail[] details,
int output,
int mode)
Calculates and returns message of given record detail array.
|
static boolean |
isImage(String fileName,
boolean output)
Obtains a files MIME type and returns true if it is of type image
|
static boolean |
isValidDirectory(String name)
Checks whether a given directory contains valid images for classification
|
static void |
main(String[] args)
The main method
|
static void |
runClassifier(String[] args)
Method to utilize all necessary classification methods in correct order with given mode
which specifies the classifier to be used (loads correct training set).
|
public CityLandscapeUtilities()
public static void runClassifier(String[] args) throws IOException
args
- IOException
public static String getOutput(org.openimaj.classifier.citylandscape.RecordDetail[] details, int output, int mode)
details
- the records to describeoutput
- the output modemode
- the modepublic static org.openimaj.classifier.citylandscape.RecordDetail[] classifyImage(ArrayList<Double> query, int k, int mode)
query
- the query vectork
- the number of neighboursmode
- the modepublic static ArrayList<Double> getImageVector(String imageName)
imageName
- public static boolean isValidDirectory(String name)
name
-