public class HistogramPatchModel extends MBFPatchClassificationModel
MBFPatchClassificationModel that performs classification
based on the joint (colour) histogram of the patch by comparing the
patch histogram to a model histogram with a given comparison measure.| Modifier and Type | Field and Description |
|---|---|
protected DoubleFVComparison |
compare |
HistogramModel |
model
The model histogram; public for speed.
|
ndimspatchHeight, patchWidth| Constructor and Description |
|---|
HistogramPatchModel(int patchWidth,
int patchHeight,
DoubleFVComparison compare,
int... nbins)
Construct with the given patch size, comparison measure and ]
number of histogram bins per dimension.
|
HistogramPatchModel(int patchWidth,
int patchHeight,
int... nbins)
Construct with the given patch size and number of histogram bins
per dimension.
|
| Modifier and Type | Method and Description |
|---|---|
float |
classifyPatch(MBFImage patch)
Classify a patch, returning the probability of the central pixel
belonging to the class.
|
HistogramPatchModel |
clone()
Clone the model
|
DoubleFVComparison |
getComparisonMeasure() |
void |
learnModel(MBFImage... images)
Learn the model from the given
MBFImages. |
void |
setComparisonMeasure(DoubleFVComparison compare)
Set the comparison measure used.
|
getArrayclassifyImage, estimate, numItemsToEstimate, predictpublic HistogramModel model
protected DoubleFVComparison compare
public HistogramPatchModel(int patchWidth, int patchHeight, int... nbins)
DoubleFVComparison.BHATTACHARYYA as the
comparison measure.patchWidth - patch width.patchHeight - patch height.nbins - number of bins per dimension.public HistogramPatchModel(int patchWidth, int patchHeight, DoubleFVComparison compare, int... nbins)
patchWidth - patch width.patchHeight - patch height.compare - comparison measure.nbins - number of bins per dimension.public DoubleFVComparison getComparisonMeasure()
public void setComparisonMeasure(DoubleFVComparison compare)
compare - the new comparison measure.public float classifyPatch(MBFImage patch)
PatchClassificationModelclassifyPatch in class PatchClassificationModel<Float[],MBFImage>patch - the patch.public HistogramPatchModel clone()
EstimatableModelclone in interface ImageClassificationModel<MBFImage>clone in interface EstimatableModel<MBFImage,FImage>clone in class PatchClassificationModel<Float[],MBFImage>public void learnModel(MBFImage... images)
ImageClassificationModelMBFImages.images - the images to learn from