Examples of SURFInterestPointN


Examples of com.alibaba.security.simpleimage.analyze.harissurf.SURFInterestPointN

            File f = new File(fileName);
            fis = new ObjectInputStream(new FileInputStream(f));
            int count = fis.readInt();
            List<SURFInterestPointN> al = new ArrayList<SURFInterestPointN>();
            for (int i = 0; i < count; i++) {
                SURFInterestPointN ip = (SURFInterestPointN) fis.readObject();
                al.add(ip);
            }
            int w = fis.readInt();
            int h = fis.readInt();
            InterestPointNListInfo ipln = new InterestPointNListInfo();
View Full Code Here

Examples of com.alibaba.security.simpleimage.analyze.harissurf.SURFInterestPointN

            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:最近邻点和次近邻点的距离比值
            SURFInterestPointN kpN = (SURFInterestPointN) be1.getNeighbour();
            if (Math.abs(kpN.getOrientation() - sp.getOrientation()) > ModifiableConst.getTowPntOrientationMinus())
            // continue;
            // if (Math.abs(kpN.getScale() - kp.getScale()) > ModifiableConst.getTowPntScaleMinus()) continue;
            matches.add(new SurfMatch(sp, kpN, be1.getDist(), be2.getDist()));
        }
        return (matches);
View Full Code Here

Examples of com.alibaba.simpleimage.analyze.harissurf.SURFInterestPointN

                g.drawImage(model, logo_width, logo_height, model_width, model_height, null);

                int x = 0;
                for (SurfMatch m : ms) {

                    SURFInterestPointN fromPoint = m.getSp1();
                    SURFInterestPointN toPoint = m.getSp2();
                    g.setColor(cs[x++ % 3]);
                    g.drawLine((int) fromPoint.getX(), (int) fromPoint.getY(), (int) toPoint.getX() + logo_width,
                               (int) toPoint.getY() + logo_height);
                }
                g.dispose();
                fos = new FileOutputStream(diff_filepath + tf.getName() + "_" + logo_surf_name + "2." + ms.size()
                                           + ".jpg");
                ImageIO.write(outputImage, "JPEG", fos);
View Full Code Here

Examples of com.alibaba.simpleimage.analyze.harissurf.SURFInterestPointN

            File f = new File(fileName);
            fis = new ObjectInputStream(new FileInputStream(f));
            int count = fis.readInt();
            List<SURFInterestPointN> al = new ArrayList<SURFInterestPointN>();
            for (int i = 0; i < count; i++) {
                SURFInterestPointN ip = (SURFInterestPointN) fis.readObject();
                al.add(ip);
            }
            int w = fis.readInt();
            int h = fis.readInt();
            InterestPointNListInfo ipln = new InterestPointNListInfo();
View Full Code Here

Examples of com.alibaba.simpleimage.analyze.harissurf.SURFInterestPointN

            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:最近邻点和次近邻点的距离比值
            SURFInterestPointN kpN = (SURFInterestPointN) be1.getNeighbour();
            if (Math.abs(kpN.getOrientation() - sp.getOrientation()) > ModifiableConst.getTowPntOrientationMinus())
            // continue;
            // if (Math.abs(kpN.getScale() - kp.getScale()) > ModifiableConst.getTowPntScaleMinus()) continue;
            matches.add(new SurfMatch(sp, kpN, be1.getDist(), be2.getDist()));
        }
        return (matches);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.