Package com.alibaba.security.simpleimage.analyze.sift.scala

Examples of com.alibaba.security.simpleimage.analyze.sift.scala.KeyPointN


            if (kpNNList.size() < 2) throw (new IllegalArgumentException("BUG: less than two neighbours!"));
            KDTree.BestEntry be1 = (KDTree.BestEntry) kpNNList.get(0);
            KDTree.BestEntry be2 = (KDTree.BestEntry) kpNNList.get(1);
            if ((be1.getDist() / be2.getDist()) > ModifiableConst.getTowPntDistRatio()) continue;
            // XXX:最近邻点和次近邻点的距离比值
            KeyPointN kpN = (KeyPointN) be1.getNeighbour();
            if (Math.abs(kpN.getOrientation() - kp.getOrientation()) > ModifiableConst.getTowPntOrientationMinus()) continue;
            // if (Math.abs(kpN.getScale() - kp.getScale()) > ModifiableConst.getTowPntScaleMinus()) continue;
            matches.add(new Match(kp, kpN, be1.getDist(), be2.getDist()));
        }
        return (matches);
    }
View Full Code Here


            fis = new ObjectInputStream(new FileInputStream(f));
            int count = fis.readInt();
            if (count == 0) return null;
            List<KeyPointN> al = new ArrayList<KeyPointN>();
            for (int i = 0; i < count; i++) {
                KeyPointN kp = (KeyPointN) fis.readObject();
                al.add(kp);
            }
            int w = fis.readInt();
            int h = fis.readInt();
            KeyPointListInfo kfl = new KeyPointListInfo();
View Full Code Here

        try {
            int count = fis.readInt();
            if (count == 0) return null;
            List<KeyPointN> al = new ArrayList<KeyPointN>();
            for (int i = 0; i < count; i++) {
                KeyPointN kp = (KeyPointN) fis.readObject();
                al.add(kp);
            }
            int w = fis.readInt();
            int h = fis.readInt();
            KeyPointListInfo kfl = new KeyPointListInfo();
View Full Code Here

            if (globalKeypoints == null)
                throw (new IllegalArgumentException ("No keypoints generated yet."));
            globalNaturalKeypoints = new ArrayList<KeyPointN>();
            for (KeyPoint kp : globalKeypoints){
                globalNaturalKeypoints.add (new KeyPointN(kp));
            }
            return (globalNaturalKeypoints);
    }
View Full Code Here

TOP

Related Classes of com.alibaba.security.simpleimage.analyze.sift.scala.KeyPointN

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.