Package com.alibaba.simpleimage.analyze.sift

Examples of com.alibaba.simpleimage.analyze.sift.ImagePixelArray


        // 瀵逛簬DOG(宸垎鍥�)鎴戜滑闇�瑕佷竴寮犱互涓婄殑鍥剧墖鎵嶈兘鐢熸垚宸垎鍥撅紝浣嗘槸鏌ユ壘鏋佸�肩偣闇�瑕佺悊澶氬樊鍒嗗浘銆傝buildDiffMaps
        smoothedImgs = new ImagePixelArray[scales + 3];
        // 姣忎竴涓瀬鍊肩偣鏄湪涓夌淮绌洪棿涓瘮杈冭幏寰�,銆�鍗宠鍜屽畠鍛ㄥ洿8涓偣鍜屼笂涓�骞呭搴旂殑9涓偣浠ュ強涓嬩竴骞呭搴旂殑9涓偣锛屽洜姝や负浜嗚幏寰梥cales灞傜偣锛岄偅涔堝湪宸垎楂樻柉閲戝瓧濉斾腑闇�瑕佹湁scales+2骞呭浘鍍�,
        // 鑰屽鏋滃樊鍒嗗浘骞呮暟鏄痵cales+2锛岄偅涔堜竴涓�︾┖闂翠腑鑷冲皯闇�瑕乻cales+2骞�
        this.baseScale = baseScale;
        ImagePixelArray prev = base;
        smoothedImgs[0] = base;

        float w = sigma;
        float kTerm = (float) Math.sqrt(Math.pow(Math.pow(2.0, 1.0 / scales), 2.0) - 1.0);
        for (int i = 1; i < smoothedImgs.length; i++) {
View Full Code Here


    public ArrayList<ScalePeak> findPeaks(float dogThresh) {

        ArrayList<ScalePeak> peaks = new ArrayList<ScalePeak>();

        ImagePixelArray current, above, below;

        // Search the D(k * sigma) to D(2 * sigma) spaces
        for (int level = 1; level < (this.diffImags.length - 1); level++) {
            current = this.diffImags[level];
            below = this.diffImags[level - 1];
View Full Code Here

    public void pretreatMagnitudeAndDirectionImgs() {

        magnitudes = new ImagePixelArray[this.smoothedImgs.length - 1];// 姊害鐨勬暟缁�
        directions = new ImagePixelArray[this.smoothedImgs.length - 1];// 鏂瑰悜鐨勬暟缁�
        for (int s = 1; s < (this.smoothedImgs.length - 1); s++) {
            magnitudes[s] = new ImagePixelArray(this.smoothedImgs[s].width, this.smoothedImgs[s].height);
            directions[s] = new ImagePixelArray(this.smoothedImgs[s].width, this.smoothedImgs[s].height);
            int w = smoothedImgs[s].width;
            int h = smoothedImgs[s].height;
            for (int y = 1; y < (h - 1); ++y) {
                for (int x = 1; x < (w - 1); ++x) {
                    magnitudes[s].data[y * w + x] = (float) Math.sqrt(Math.pow(smoothedImgs[s].data[y * w + x + 1]
View Full Code Here

        float sigma = 3.0f * fpScale;
        int radius = (int) (3.0 * sigma / 2.0 + 0.5);
        int radiusSq = radius * radius;

        ImagePixelArray magnitude = magnitudes[point.level];
        ImagePixelArray direction = directions[point.level];
        // 纭畾閭荤偣鑼冨洿
        int xMin = Math.max(point.x - radius, 1);
        int xMax = Math.min(point.x + radius, magnitude.width - 1);
        int yMin = Math.max(point.y - radius, 1);
        int yMax = Math.min(point.y + radius, magnitude.height - 1);
View Full Code Here

        while (needToAdjust) {
            int x = peak.x;
            int y = peak.y;
            if (peak.level <= 0 || peak.level >= (this.diffImags.length - 1)) return (true);

            ImagePixelArray space = diffImags[peak.level];
            if (x <= 0 || x >= (space.width - 1)) return (true);
            if (y <= 0 || y >= (space.height - 1)) return (true);

            RefFloat dp = new RefFloat();
            AdjustedArray adj = getAdjustment(peak, peak.level, x, y, dp);
View Full Code Here

        ref.val = 0.0f;
        if (peak.level <= 0 || peak.level >= (this.diffImags.length - 1)) {
            throw (new IllegalArgumentException("point.Level is not within [bottom-1;top-1] range"));
        }
        ImagePixelArray b = this.diffImags[level - 1]; // below
        ImagePixelArray c = this.diffImags[level]; // current
        ImagePixelArray a = this.diffImags[level + 1]; // above

        AdjustedArray h = new AdjustedArray(3, 3);
        /*
         * 涓嬮潰鏄骞呭浘鍍忓昂搴︾┖闂寸殑涓夊厓鍋忓鏁帮紝璁颁綇鏄昂搴︾┖闂翠笂 鐨勪簩闃惰嚜鍙橀噺涓�勫亸瀵兼暟2006.3.1
         */
 
View Full Code Here

TOP

Related Classes of com.alibaba.simpleimage.analyze.sift.ImagePixelArray

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.