@Override final void normalise(Histogram h, int blockArea) { h.normaliseL1(); } },
@Override final void normalise(Histogram h, int blockArea) { h.normaliseL1(); } },
@Override final void normalise(Histogram h, int blockArea) { h.normaliseL1(); for (int x = 0; x < h.values.length; x++) h.values[x] = Math.sqrt(h.values[x]); } },
@Override final void normalise(Histogram h, int blockArea) { h.normaliseL1(); for (int x = 0; x < h.values.length; x++) h.values[x] = Math.sqrt(h.values[x]); } },
/** * Extract the PHOG feature for the specified region of the image last * analysed with {@link #analyseImage(FImage)}. * * @param rect * the region * @return the PHOG feature */ public Histogram getFeatureVector(Rectangle rect) { final QuadtreeSampler sampler = new QuadtreeSampler(rect, nlevels + 1); Histogram hist = new Histogram(0); for (final Rectangle r : sampler) { final Histogram h = histExtractor.computeHistogram(r, magnitudes); hist = hist.combine(h); } hist.normaliseL1(); return hist; }
/** * Extract the PHOG feature for the specified region of the image last * analysed with {@link #analyseImage(FImage)}. * * @param rect * the region * @return the PHOG feature */ public Histogram getFeatureVector(Rectangle rect) { final QuadtreeSampler sampler = new QuadtreeSampler(rect, nlevels + 1); Histogram hist = new Histogram(0); for (final Rectangle r : sampler) { final Histogram h = histExtractor.computeHistogram(r, magnitudes); hist = hist.combine(h); } hist.normaliseL1(); return hist; }