當前位置: 首頁>>代碼示例>>Java>>正文


Java IAutoCorrelogramFeatureExtractor類代碼示例

本文整理匯總了Java中net.semanticmetadata.lire.imageanalysis.correlogram.IAutoCorrelogramFeatureExtractor的典型用法代碼示例。如果您正苦於以下問題:Java IAutoCorrelogramFeatureExtractor類的具體用法?Java IAutoCorrelogramFeatureExtractor怎麽用?Java IAutoCorrelogramFeatureExtractor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IAutoCorrelogramFeatureExtractor類屬於net.semanticmetadata.lire.imageanalysis.correlogram包,在下文中一共展示了IAutoCorrelogramFeatureExtractor類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: AutoColorCorrelogram

import net.semanticmetadata.lire.imageanalysis.correlogram.IAutoCorrelogramFeatureExtractor; //導入依賴的package包/類
/**
     * Creates a new AutoColorCorrelogram using a maximum L_inf pixel distance for analysis and given mode
     */
    public AutoColorCorrelogram(int numBins, int[] distanceSet, IAutoCorrelogramFeatureExtractor extractionAlgorith) {
        this.numBins = numBins;
        this.distanceSet = distanceSet;

        if (extractionAlgorith == null) {
            switch (DEFAULT_EXTRACTION_METHOD) {
                case LireAlgorithm:
                    this.extractionAlgorithm = new MLuxAutoCorrelogramExtraction();
                    break;
                case NaiveHuangAlgorithm:
                    this.extractionAlgorithm = new NaiveAutoCorrelogramExtraction();
                    break;
                case DynamicProgrammingHuangAlgorithm:
                    this.extractionAlgorithm = DynamicProgrammingAutoCorrelogramExtraction.getInstance();
                    break;
            }
        } else this.extractionAlgorithm = extractionAlgorith;

        if (numBins < 17) {
            quantH_f = 4f;
            quantS_f = 2f;
            quantV_f = 2f;
            this.numBins = 16;
        } else if (numBins < 33) {
            quantH_f = 8f;
            quantS_f = 2f;
            quantV_f = 2f;
            this.numBins = 32;
        } else if (numBins < 65) {
            quantH_f = 8f;
            quantS_f = 4f;
            quantV_f = 2f;
            this.numBins = 64;
        } else if (numBins < 129) {
            quantH_f = 8f;
            quantS_f = 4f;
            quantV_f = 4f;
            this.numBins = 128;
        } else {
            quantH_f = 16f;
            quantS_f = 4f;
            quantV_f = 4f;
            this.numBins = 256;
        }
        quantH = 360f / quantH_f;
        quantS = 256f / quantS_f;
        quantV = 256f / quantV_f;

        // init quantization table:
//        int count = 0;
//        quantTable = new int[(int) quantH_f][(int) quantS_f][(int) quantV_f];
//        for (int[][] ints : quantTable) {
//            for (int[] anInt : ints) {
//                for (int k = 0; k < anInt.length; k++) {
//                    anInt[k] = count;
//                    assert (count < numBins);
//                    count++;
//                }
//            }
//        }
    }
 
開發者ID:fish2000,項目名稱:lire,代碼行數:65,代碼來源:AutoColorCorrelogram.java


注:本文中的net.semanticmetadata.lire.imageanalysis.correlogram.IAutoCorrelogramFeatureExtractor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。