public class HistogramPixelModel extends MBFPixelClassificationModel
MBFPixelClassificationModel
that classifies an individual pixel by
comparing it to a joint (colour) histogram. The histogram is learnt from the
positive pixel samples given in training. The probability returned by the
classification is determined from the value of the histogram bin in which the
pixel being classified falls.Modifier and Type | Field and Description |
---|---|
HistogramModel |
model
The model histogram; public for speed.
|
ndims
Constructor and Description |
---|
HistogramPixelModel(int... nbins)
Construct with the given number of histogram bins per dimension.
|
Modifier and Type | Method and Description |
---|---|
protected float |
classifyPixel(Float[] pix) |
HistogramPixelModel |
clone()
Clone the model
|
void |
learnModel(MBFImage... images)
Learn the model from the given
MBFImage s. |
String |
toString() |
getArray
classifyImage, estimate, numItemsToEstimate, predict
public HistogramModel model
public HistogramPixelModel(int... nbins)
nbins
- number of bins per dimension.protected float classifyPixel(Float[] pix)
classifyPixel
in class PixelClassificationModel<Float[],MBFImage>
public HistogramPixelModel clone()
EstimatableModel
clone
in interface ImageClassificationModel<MBFImage>
clone
in interface EstimatableModel<MBFImage,FImage>
clone
in class PixelClassificationModel<Float[],MBFImage>
public void learnModel(MBFImage... images)
ImageClassificationModel
MBFImage
s.images
- the images to learn from