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

Examples of com.alibaba.security.simpleimage.analyze.sift.matrix.SimpleMatrix


        ImageMap below = spaces[level - 1];
        ImageMap current = spaces[level];
        ImageMap above = spaces[level + 1];

        SimpleMatrix H = new SimpleMatrix(3, 3);
        /*
         * 下面是该幅图像尺度空间的三元偏导数,记住是尺度空间上 的二阶自变量为3的偏导数2006.3.1
         */
        H.values[0][0] = below.valArr[y][x] - 2 * current.valArr[y][x] + above.valArr[y][x];
        H.values[0][1] = H.values[1][0] = 0.25 * (above.valArr[y + 1][x] - above.valArr[y - 1][x] - (below.valArr[y + 1][x] - below.valArr[y - 1][x]));
        H.values[0][2] = H.values[2][0] = 0.25 * (above.valArr[y][x + 1] - above.valArr[y][x - 1] - (below.valArr[y][x + 1] - below.valArr[y][x - 1]));
        H.values[1][1] = current.valArr[y - 1][x] - 2 * current.valArr[y][x] + current.valArr[y + 1][x];
        H.values[1][2] = H.values[2][1] = 0.25 * (current.valArr[y + 1][x + 1] - current.valArr[y + 1][x - 1] - (current.valArr[y - 1][x + 1] - current.valArr[y - 1][x - 1]));
        H.values[2][2] = current.valArr[y][x - 1] - 2 * current.valArr[y][x] + current.valArr[y][x + 1];

        SimpleMatrix d = new SimpleMatrix(3, 1);
        /*
         * 下面这个是自变量为3的一阶偏导数2006.3.1
         */
        d.values[0][0] = 0.5 * (above.valArr[y][x] - below.valArr[y][x]);
        d.values[1][0] = 0.5 * (current.valArr[y + 1][x] - current.valArr[y - 1][x]);
        d.values[2][0] = 0.5 * (current.valArr[y][x + 1] - current.valArr[y][x - 1]);

        SimpleMatrix b = (SimpleMatrix) d.clone();
        b.negate();
        // Solve: A x = b
        H.solveLinear(b);
        ref.val = b.dot(d);
        return (b);
    }
View Full Code Here


            ImageMap space = spaces[point.level];
            if (x <= 0 || x >= (space.xDim - 1)) return (true);
            if (y <= 0 || y >= (space.yDim - 1)) return (true);

            RefDouble dp = new RefDouble();
            SimpleMatrix adj = getAdjustment(point, point.level, x, y, dp);

            // Get adjustments and check if we require further adjustments due
            // to pixel level moves. If so, turn the adjustments into real
            // changes and continue the loop. Do not adjust the plane, as we
            // are usually quite low on planes in thie space and could not do
View Full Code Here

TOP

Related Classes of com.alibaba.security.simpleimage.analyze.sift.matrix.SimpleMatrix

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.