Package jjil.core

Examples of jjil.core.Point


        byte[] bData = im.getData();
        Vector points = new Vector();
        for (int i=0; i<im.getHeight(); i++) {
            for (int j=0; j<im.getWidth(); j++) {
                if (bData[i*im.getWidth()+j] != Byte.MIN_VALUE) {
                    points.addElement(new Point(i,j));
                }
            }
        }
        this.hough.push(points);
    }
View Full Code Here


                                jjil.algorithm.ErrorCodes.OBJECT_NOT_EXPECTED_TYPE,
                                o.toString(),
                                "Point",
                                null);
             }
            Point p = (Point) o;
            addPoint(p);
        }
        findPeak(); // sets cYInt, cSlope, cCount for access by caller
        this.cHoughAccum = null; // free memory
    }
View Full Code Here

        assert lcp != null;
        scaleAndCenter(lcp);
        if (lcp.size() > 0) {
            JessRect jrBox = null;
            for (CircListIter cli = lcp.get(0).circListIterator(); cli.hasNext();) {
                Point pt = (Point) cli.next();
                if (jrBox == null) {
                    jrBox = new JessRect(pt);
                } else {
                    jrBox.add(pt);
                }
View Full Code Here

        if (eps.size() <= 2) {
            return;
        }
        EdgePts polypts = new EdgePts(this.mTimeTracker);
        for (CircularList<EdgePt>.CircListIter cli = eps.circListIterator(); cli.hasNext();) {
            Point p = cli.next().getPos();
            Point pos = new Point((p.getX()*this.mnScale+this.mnOffsetX)/256,
                    (p.getY()*this.mnScale+this.mnOffsetY)/256);
            Point ptNext = cli.getNext().getPos();
            Point posNext = new Point((ptNext.getX()*this.mnScale+this.mnOffsetX)/256,
                    (ptNext.getY()*this.mnScale+this.mnOffsetY)/256);
            Point pt = new Point((int) pos.getX(), (int) pos.getY());
            Vec2 vec = new Vec2((int) (posNext.getX() - pos.getX()),
                    (int) (posNext.getY() - pos.getY()));
            polypts.add(new EdgePt(pt,vec));
        }
        this.add(polypts);
View Full Code Here

     * @param jrBox the jr box
     */
    private void setPoints(CircularList<Point> lp, JessRect jrBox) {
        CircularList<Point> clNew = new CircularList<Point>();
        for (CircularList<Point>.CircListIter cli = lp.circListIterator(); cli.hasPrevious();) {
            Point pt = cli.previous();
            Point ptNew = new Point(pt.getX(), jrBox.getTop()-pt.getY());
            clNew.add(ptNew);
       
        EdgePts eps = new EdgePts(clNew, this.mTimeTracker);
        approximate(eps, jrBox);
    }
View Full Code Here

        for (CircularList<EdgePt> OutLine : leps) {
            if (OutLine.size() <= 1) {
                continue;
            }
            CircularList<EdgePt>.CircListIter li = OutLine.circListIterator();
            Point Last = li.getNext().getPos();
            while (li.hasNext()) {
                li.next();
                Point Norm = li.getNext().getPos();
                int n = 1;
                Vec2 Delta = new Vec2(Last, Norm);
                int Length = 0;
                try {
                    Length = Delta.length();
View Full Code Here

        for (CircularList<EdgePt> Loop : leps) {
            /* Check for bad loops */
            if (Loop.size() <= 1) {
                return;
            }
            Point Last = null;
            for (ListIterator<EdgePt> li = Loop.loopIterator();
                    li.hasNext();) {
                EdgePt Segment = li.next();
                int LastX = (Segment.getPos().getX() - this.mvMean.getX()) *
                        this.mnRyInv;
                int LastY = (Segment.getPos().getY() - this.mvMean.getY()) *
                        this.mnRxInv;
                LastX >>= this.mnRyExp;
                LastY >>= this.mnRxExp;
                Point Norm = new Point(LastX, LastY);
                if (Last == null) {
                    Last = Norm;
                } else {
                    int n = 1;
                    Vec2 Delta = new Vec2(Last, Norm);
View Full Code Here

        Vec2 I = new Vec2(0, 0);
        for (CircularList<EdgePt> Outline : leps) {
            if (Outline.size() <= 1) {
                continue;
            }
            Point Last = null;
            for (ListIterator<EdgePt> li = Outline.loopIterator();
                    li.hasNext();) {
                EdgePt Segment = li.next();
                Point Norm = Segment.getPos().clone();
                if (Last == null) {
                    Last = Norm;
                } else {
                    int n = 1;
                    Vec2 Delta = new Vec2(Last, Norm);
View Full Code Here

     * Add a vector to a point, returning the point
     * @param p point to adjust by this vector
     * @return new point, offset by this Vec2
     */
    public Point add(Point p) {
        return new Point(p.getX() + (int)this.fX, p.getY() + (int)this.fY);
    }
View Full Code Here

     * Add a vector to a point, returning the point
     * @param p point to adjust by this vector
     * @return new point, offset by this Vec2
     */
    public Point add(int x, int y) {
        return new Point(x + (int)this.fX, y + (int)this.fY);
    }
View Full Code Here

TOP

Related Classes of jjil.core.Point

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.