javax.visrec

## Class AbstractImageClassifier<IMAGE_CLASS,MODEL_CLASS>

- java.lang.Object
- - javax.visrec.AbstractImageClassifier<IMAGE_CLASS,MODEL_CLASS>

Type Parameters:
  `IMAGE_CLASS` - class of images
  `MODEL_CLASS` - class of machine learning model

All Implemented Interfaces:
  Classifier<IMAGE_CLASS,String>

    public abstract class AbstractImageClassifier<IMAGE_CLASS,MODEL_CLASS>
    extends Object
    implements Classifier<IMAGE_CLASS,String>

Skeleton abstract class to make it easier to implement image classifier. It provides implementation of Classifier interface for images, along with image factory for specific type of images. This class solves the problem of using various implementation of images and machine learning models in Java, and provides standard Classifier API for clients. By default the type of key in the Map the `Classifier` is `String`

Author:
  Zoran Sevarac

### Constructor Summary

Constructors
`protected` `AbstractImageClassifier(Class<IMAGE_CLASS> cls)`
`` `AbstractImageClassifier(MODEL_CLASS model)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Map<String,Float>` `classify(File file)`
`Map<String,Float>` `classify(InputStream inStream)`
`ImageFactory<IMAGE_CLASS>` `getImageFactory()`
`MODEL_CLASS` `getModel()`
`float` `getThreshold()`
`protected void` `setModel(MODEL_CLASS model)`
`void` `setThreshold(float threshold)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface javax.visrec.ml.classification.Classifier

`classify`

### Constructor Detail

#### AbstractImageClassifier

    public AbstractImageClassifier(MODEL_CLASS model)

#### AbstractImageClassifier

    protected AbstractImageClassifier(Class<IMAGE_CLASS> cls)

### Method Detail

#### getImageFactory

    public ImageFactory<IMAGE_CLASS> getImageFactory()

#### classify

    public Map<String,Float> classify(File file)
                               throws IOException

Throws:
  `IOException`

#### classify

    public Map<String,Float> classify(InputStream inStream)
                               throws IOException

Throws:
  `IOException`

#### getModel

    public MODEL_CLASS getModel()

#### setModel

    protected void setModel(MODEL_CLASS model)

#### getThreshold

    public float getThreshold()

#### setThreshold

    public void setThreshold(float threshold)