@Override public void process(T image) { // detect features and setup describe and orientation detector.detect(image); describe.setImage(image); if (orientation != null) orientation.setImage(image); // go through each set of features for (int i = 0; i < info.length; i++) { FoundPointSO points = detector.getFeatureSet(i); SetInfo<TD> setInfo = info[i]; setInfo.reset(); // describe each detected feature for (int j = 0; j < points.getNumberOfFeatures(); j++) { Point2D_F64 p = points.getLocation(j); double radius = points.getRadius(j); double ori = points.getOrientation(j); if (orientation != null) { orientation.setObjectRadius(radius); ori = orientation.compute(p.x, p.y); } TD d = setInfo.descriptors.grow(); if (describe.process(p.x, p.y, ori, radius, d)) { setInfo.location.grow().set(p); } else { setInfo.descriptors.removeTail(); } } } }
public DetectDescribeMultiFusion( DetectorInterestPointMulti<T> detector, OrientationImage<T> orientation, DescribeRegionPoint<T, TD> describe) { this.detector = detector; this.orientation = orientation; this.describe = describe; info = new SetInfo[detector.getNumberOfSets()]; for (int i = 0; i < info.length; i++) { info[i] = new SetInfo<TD>(); info[i].descriptors = UtilFeature.createQueue(describe, 10); } }