/** * 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; }