当前位置: 首页>>代码示例>>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;未经允许,请勿转载。