当前位置: 首页>>代码示例>>Java>>正文


Java MBFImage.analyseWith方法代码示例

本文整理汇总了Java中org.openimaj.image.MBFImage.analyseWith方法的典型用法代码示例。如果您正苦于以下问题:Java MBFImage.analyseWith方法的具体用法?Java MBFImage.analyseWith怎么用?Java MBFImage.analyseWith使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openimaj.image.MBFImage的用法示例。


在下文中一共展示了MBFImage.analyseWith方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: analyseImage

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public void analyseImage(MBFImage image) {
	final int width = image.getWidth();
	final int height = image.getHeight();

	image.analyseWith(saliencyGenerator);
	final TObjectFloatHashMap<ConnectedComponent> componentMap = saliencyGenerator.getSaliencyComponents();

	asSum = 0;
	aseSum = 0;
	componentMap.forEachEntry(new TObjectFloatProcedure<ConnectedComponent>() {
		@Override
		public boolean execute(ConnectedComponent c, float s) {
			final double as = c.calculateArea() * s;

			final double D = closestDistance(c, width, height);

			asSum += as;
			aseSum += as * Math.exp(-(D * D) / (2 * SIGMA));

			return true;
		}
	});
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:25,代码来源:RuleOfThirds.java

示例2: extract

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public FeatureVector extract(MBFImage image, FImage mask) {
	Colorfulness f = new Colorfulness();

	if (mask == null)
		image.analyseWith(f);
	else
		image.analyseWithMasked(mask, f);

	if (classMode)
		return f.getColorfulnessAttribute().getFeatureVector();
	return f.getFeatureVector();
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:14,代码来源:ColourfulnessExtractor.java

示例3: analyseImage

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public void analyseImage(MBFImage image) {
	image.analyseWith(saliencyGenerator);
	final TObjectFloatHashMap<ConnectedComponent> componentMap = saliencyGenerator.getSaliencyComponents();

	final float max = ArrayUtils.maxValue(componentMap.values());

	final FImage map = new FImage(image.getWidth(), image.getHeight());
	final float thresh = max * alpha;
	final BoundingBoxRenderer<Float> renderer = new BoundingBoxRenderer<Float>(map, 1F, true);

	componentMap.forEachEntry(new TObjectFloatProcedure<ConnectedComponent>() {
		@Override
		public boolean execute(ConnectedComponent cc, float sal) {
			if (sal >= thresh) { // note that this is reversed from the
				// paper, which doesn't seem to make
				// sense.
				renderer.process(cc);
			}

			return true;
		}
	});

	roiProportion = 0;
	for (int y = 0; y < map.height; y++)
		for (int x = 0; x < map.width; x++)
			roiProportion += map.pixels[y][x];

	roiProportion /= (map.width * map.height); // smaller simplicity means
	// smaller ROI
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:33,代码来源:ROIProportion.java

示例4: main

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
public static void main(String[] args) throws IOException {
	final AvgBrightness brightness = new AvgBrightness();
	final Colorfulness colorfulness = new Colorfulness();
	final Naturalness naturalness = new Naturalness();
	final RMSContrast contrast = new RMSContrast();
	final RGBRMSContrast rgbcontrast = new RGBRMSContrast();
	final Sharpness sharpness = new Sharpness();
	final SharpnessVariation sharpnessVariation = new SharpnessVariation();
	final Saturation saturation = new Saturation();
	final SaturationVariation saturationVariation = new SaturationVariation();

	final File[] files = new File("/Users/jon/Dropbox/features/images").listFiles(new FilenameFilter() {
		@Override
		public boolean accept(File dir, String name) {
			return name.endsWith(".jpg");
		}
	});

	for (final File f : files) {
		final MBFImage image = ImageUtilities.readMBF(f);
		final FImage fimage = Transforms.calculateIntensity(image);

		brightness.analyseImage(image);
		System.out.println(f.getName() + "\tbrightness\t" + brightness.getBrightness());

		image.analyseWith(colorfulness);
		System.out.println(f.getName() + "\tcolorfulness\t" + colorfulness.getColorfulness());

		naturalness.analyseImage(image);
		System.out.println(f.getName() + "\tnaturalness\t" + naturalness.getNaturalness());

		contrast.analyseImage(fimage);
		System.out.println(f.getName() + "\trms-contrast\t" + contrast.getContrast());

		rgbcontrast.analyseImage(image);
		System.out.println(f.getName() + "\trgb-rms-contrast\t" + rgbcontrast.getContrast());

		sharpness.analyseImage(fimage);
		System.out.println(f.getName() + "\tsharpness\t" + sharpness.getSharpness());

		sharpnessVariation.analyseImage(fimage);
		System.out.println(f.getName() + "\tsharpness-variation\t" + sharpnessVariation.getSharpnessVariation());

		saturation.analyseImage(image);
		System.out.println(f.getName() + "\tsaturation\t" + saturation.getSaturation());

		saturationVariation.analyseImage(image);
		System.out.println(f.getName() + "\tsaturation-variation\t" + saturationVariation.getSaturationVariation());
	}
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:51,代码来源:Features.java

示例5: extract

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public FeatureVector extract(MBFImage image, FImage mask) {
	ColourContrast cc = new ColourContrast(sigma, k, minSize);
	image.analyseWith(cc);
	return cc.getFeatureVector();
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:7,代码来源:ColourContrastExtractor.java

示例6: extract

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public FeatureVector extract(MBFImage image, FImage mask) {
	LuoSimplicity cc = new LuoSimplicity(binsPerBand, gamma, alpha, maxKernelSize, kernelSizeStep, nbins, windowSize);
	image.analyseWith(cc);
	return cc.getFeatureVector();
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:7,代码来源:LuoSimplicityExtractor.java

示例7: extract

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public FeatureVector extract(MBFImage image, FImage mask) {
	ROIProportion cc = new ROIProportion(saliencySigma, segmenterSigma, k, minSize, alpha);
	image.analyseWith(cc);
	return cc.getFeatureVector();
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:7,代码来源:RoiProportionExtractor.java

示例8: extract

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public FeatureVector extract(MBFImage image, FImage mask) {
	RuleOfThirds cc = new RuleOfThirds(saliencySigma, segmenterSigma, k, minSize);
	image.analyseWith(cc);
	return cc.getFeatureVector();
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:7,代码来源:RuleOfThirdsExtractor.java

示例9: extract

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public FeatureVector extract(MBFImage image, FImage mask) {
	Naturalness f = new Naturalness(mask);
	image.analyseWith(f);
	return f.getFeatureVector();
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:7,代码来源:NaturalnessExtractor.java

示例10: extract

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public FeatureVector extract(MBFImage image, FImage mask) {
	ModifiedLuoSimplicity cc = new ModifiedLuoSimplicity(binsPerBand, gamma, !noBoxMode, alpha, saliencySigma, segmenterSigma, k, minSize);
	image.analyseWith(cc);
	return cc.getFeatureVector();
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:7,代码来源:ModifiedLuoSimplicityExtractor.java

示例11: extract

import org.openimaj.image.MBFImage; //导入方法依赖的package包/类
@Override
public FeatureVector extract(MBFImage image, FImage mask) {
	HueStats f = new HueStats(mask);
	image.analyseWith(f);
	return f.getFeatureVector();
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:7,代码来源:HueStatsExtractor.java


注:本文中的org.openimaj.image.MBFImage.analyseWith方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。