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


Java FImage.drawShapeFilled方法代码示例

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


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

示例1: testCircle

import org.openimaj.image.FImage; //导入方法依赖的package包/类
/**
 * Test
 */
@Test
public void testCircle() {
	final int imgWidthHeight = 200;

	final FImage circleImage = new FImage(imgWidthHeight, imgWidthHeight);
	final Circle c = new Circle(imgWidthHeight / 2 + 3, imgWidthHeight / 2 + 1, imgWidthHeight / 4);
	circleImage.drawShapeFilled(c, 1f);

	final CannyEdgeDetector det = new CannyEdgeDetector();
	final FImage edgeImage = circleImage.process(det);

	final HoughCircles circ = new HoughCircles(5, imgWidthHeight, 5, 360);
	edgeImage.analyseWith(circ);

	final List<WeightedCircle> best = circ.getBest(1);
	final WeightedCircle b = best.get(0);

	assertTrue(b.equals(c));
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:23,代码来源:HoughCirclesTest.java

示例2: generateData

import org.openimaj.image.FImage; //导入方法依赖的package包/类
public static List<IndependentPair<PointList, FImage>> generateData(int number) {
	final List<IndependentPair<PointList, FImage>> data = new ArrayList<IndependentPair<PointList, FImage>>(number);

	final Random rnd = new Random();

	for (int i = 0; i < number; i++) {
		final float c1 = rnd.nextFloat();
		float c2 = rnd.nextFloat();

		while (Math.abs(c1 - c2) < 0.1) {
			c2 = rnd.nextFloat();
		}

		final Triangle t = new Triangle(
				new Point2dImpl(((float) i / (number - 1)) * 80 + 10f, 10),
				new Point2dImpl(90, 90),
				new Point2dImpl(10, 90)
				);

		final FImage img = new FImage(100, 100);
		img.fill(Math.min(c1, c2));
		img.drawShapeFilled(t, Math.max(c1, c2));

		data.add(new IndependentPair<PointList, FImage>(t.asPolygon(), img));
	}

	return data;
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:29,代码来源:ASMTester.java

示例3: loadReference

import org.openimaj.image.FImage; //导入方法依赖的package包/类
protected void loadReference() {
	referenceTriangles = CLMFaceTracker.getTriangles(config.referenceShape, null, this.config.triangles);

	mask = new FImage(size, size);

	for (final Triangle t : referenceTriangles) {
		// magic numbers chosen to scale and centre the face
		// with a small border
		t.scale(0.3f * size);
		t.translate(0.5f * size, 0.45f * size);

		mask.drawShapeFilled(t, 1f);
	}
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:15,代码来源:CLMAligner.java

示例4: DoGColourSIFTEngineTest

import org.openimaj.image.FImage; //导入方法依赖的package包/类
/**
 * Constructor
 */
public DoGColourSIFTEngineTest() {
	FImage blankImage = new FImage(300,300);
	FImage testImage = new FImage(300,300);
	
	testImage.drawShapeFilled(new Circle(150 ,150, 50), 1f);
	
	im1 = new MBFImage(testImage, blankImage, blankImage);
	im2 = new MBFImage(blankImage, testImage, blankImage);
	im3 = new MBFImage(blankImage, blankImage, testImage);
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:14,代码来源:DoGColourSIFTEngineTest.java

示例5: getROIMap

import org.openimaj.image.FImage; //导入方法依赖的package包/类
/**
 * @return a mask image showing the region of interest.
 */
public FImage getROIMap() {
	FImage image = new FImage(dofMap.width, dofMap.height);
	image.drawShapeFilled(calculateROI(), 1f);
	return image;
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:9,代码来源:LuoTangSubjectRegion.java


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