Q - Type of pixelT - Type of Imagepublic abstract class PatchClassificationModel<Q,T extends org.openimaj.image.Image<Q,T>> extends Object implements ImageClassificationModel<T>
ImageClassificationModel based on the idea of determining the
probability of a class of a pixel given the local patch of pixels surrounding
the pixel in question. A sliding window of a given size is moved across the
image (with overlap), and the contents of the window are analysed to
determine the probability belonging to the pixel at the centre of the window.| Modifier and Type | Field and Description |
|---|---|
protected int |
patchHeight |
protected int |
patchWidth |
| Constructor and Description |
|---|
PatchClassificationModel(int patchWidth,
int patchHeight)
Construct with the given dimensions for the sampling patch.
|
| Modifier and Type | Method and Description |
|---|---|
org.openimaj.image.FImage |
classifyImage(T im)
Classify the given image and return the corresponding probability map
|
abstract float |
classifyPatch(T patch)
Classify a patch, returning the probability of the central pixel
belonging to the class.
|
abstract PatchClassificationModel<Q,T> |
clone() |
boolean |
estimate(List<? extends org.openimaj.util.pair.IndependentPair<T,org.openimaj.image.FImage>> data) |
protected abstract T[] |
getArray(int length) |
int |
numItemsToEstimate() |
org.openimaj.image.FImage |
predict(T data) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlearnModelprotected int patchHeight
protected int patchWidth
public PatchClassificationModel(int patchWidth, int patchHeight)
patchWidth - the width of the sampling patchpatchHeight - the height of the sampling patchpublic abstract float classifyPatch(T patch)
patch - the patch.public org.openimaj.image.FImage classifyImage(T im)
ImageClassificationModelclassifyImage in interface ImageClassificationModel<T extends org.openimaj.image.Image<Q,T>>im - the image to classifypublic abstract PatchClassificationModel<Q,T> clone()
public boolean estimate(List<? extends org.openimaj.util.pair.IndependentPair<T,org.openimaj.image.FImage>> data)
public int numItemsToEstimate()