Examples of FixationLineUtil


Examples of de.dfki.km.text20.services.evaluators.gaze.util.FixationLineUtil

        if (this.lastFixations.size() < 3) return;

        // Check if we should look for a new fixation line ...
        if (this.currentFixationLine == null) {
            final FixationLineImpl candidata = createFixationLine(getLast(3));
            final FixationLineUtil flu = new FixationLineUtil(candidata);

            // Check start of line.
            for (double d : flu.getAllAngles()) {
                if (Math.abs(d) > 0.4) return;
            }
            // if (flu.getDimension().width > 100) return;
            // if (flu.getAvgVerticalDeviation() > 50) return;

            this.currentFixationLine = candidata;
            this.avgStartLength = flu.getAvgSaccadeLength();

            dispatch(FixationLineEventType.FIXATION_LINE_STARTED);
            this.misdetected = 0;
        } else {
            // ... or for a continuation
            final FixationLineUtil flu = new FixationLineUtil(this.currentFixationLine);
            final Fixation lastProperFixation = flu.getLastFixations(1).get(0);

            final Point properCenter = lastProperFixation.getCenter();
            final Point currentCenter = getLast(1).get(0).getCenter();

            final int oldMis = this.misdetected;

            // Check backward jump distance
            if (currentCenter.x - properCenter.x < -2 * this.avgStartLength) {
                this.misdetected++;
            }

            // Check forward jump distance
            if (currentCenter.x - properCenter.x > 2.5 * this.avgStartLength) {
                this.misdetected++;
            }

            // Check angle (TODO...)
            if (Math.abs(flu.getAverageYPosition() - currentCenter.y) > 50) {
                this.misdetected++;
            }

            // Check current status and dispatch
            if (oldMis < this.misdetected) {
View Full Code Here

Examples of de.dfki.km.text20.services.evaluators.gaze.util.FixationLineUtil

        //    if (!this.pseudorenderer.getStatus().contains(PseudorendererStatus.VISIBLE))
        //        return;
        // }

        final FixationLine fl = event.getFixationLine();
        final FixationLineUtil flu = new FixationLineUtil(fl);

        //
        // If the fixation line was started, pick an appropriate line of text
        //
        if (event.getEventType() == FixationLineEventType.FIXATION_LINE_STARTED) {
            //
        }

        //
        // In case the line was continued
        //
        if (event.getEventType() == FixationLineEventType.FIXATION_LINE_CONTINUED) {
            //
        }

        //
        // In case the line was continued
        //
        if (event.getEventType() == FixationLineEventType.FIXATION_LINE_ENDED) {
            //
        }

        final List<Fixation> lastFixations = flu.getLastFixations(2);

        final Fixation a = lastFixations.get(0);
        final Fixation b = lastFixations.get(1);

        dispatchWith(fl, a, b);
View Full Code Here

Examples of de.dfki.km.text20.services.evaluators.gaze.util.FixationLineUtil

        if (!this.pseudorenderer.getStatus().contains(PseudorendererStatus.VISIBLE))
            return;

        for (final String h : handler) {
            final FixationLine fixationLine = event.getFixationLine();
            final FixationLineUtil fixationLineUtil = new FixationLineUtil(fixationLine);
            final Rectangle r = fixationLineUtil.getRectangle();

            System.out.println("PERUSAL LISTENER CURRENTLY DAMAGED!");

            this.browserPlugin.executeJSFunction(h, 0, r.x, r.y, r.width, r.height, "FIXME");
        }
View Full Code Here

Examples of de.dfki.km.text20.services.evaluators.gaze.util.FixationLineUtil

        final int x1 = a.getCenter().x;
        final int x2 = b.getCenter().x;

        final int delta = x2 - x1;

        final FixationLineUtil fixationLineUtil = new FixationLineUtil(fixationLine);
        final Rectangle r = fixationLineUtil.getRectangle();

        this.logger.fine("Perusing with " + delta);

        for (final String h : handler) {
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.