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


Java TupleDesc类代码示例

本文整理汇总了Java中boofcv.struct.feature.TupleDesc的典型用法代码示例。如果您正苦于以下问题:Java TupleDesc类的具体用法?Java TupleDesc怎么用?Java TupleDesc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: dda

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
public static <I extends ImageSingleBand, D extends ImageSingleBand, Desc extends TupleDesc>
PointTrackerTwoPass<I> dda(GeneralFeatureDetector<I, D> detector,
						   DescribeRegionPoint<I, Desc> describe,
						   AssociateDescription2D<Desc> associate1,
						   AssociateDescription2D<Desc> associate2,
						   double scale,
						   Class<I> imageType) {

	EasyGeneralFeatureDetector<I,D> easy = new EasyGeneralFeatureDetector<I, D>(detector,imageType,null);

	DdaManagerGeneralPoint<I,D,Desc> manager = new DdaManagerGeneralPoint<I,D,Desc>(easy,describe,scale);

	if( associate2 == null )
		associate2 = associate1;

	return new DetectDescribeAssociateTwoPass<I,Desc>(manager,associate1,associate2,false);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:18,代码来源:FactoryPointTrackerTwoPass.java

示例2: extractDescription

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
/**
 * Just checks to see if the extracted description is not zero from new tracks
 */
@Test
public void extractDescription() {
	// is this interface supported?
	tracker = createTracker();
	if( !(tracker instanceof ExtractTrackDescription) )
		return;

	processImage((T)image);
	tracker.spawnTracks();
	ExtractTrackDescription extract = (ExtractTrackDescription)tracker;

	List<PointTrack> tracks = tracker.getNewTracks(null);
	assertTrue( tracks.size() > 0 );
	for( PointTrack t : tracks ) {
		TupleDesc des = extract.extractDescription(t);
		assertTrue(des != null);
	}
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:22,代码来源:StandardPointTracker.java

示例3: combined

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
/**
 * Creates a tracker that is a hybrid between KLT and Detect-Describe-Associate (DDA) trackers.
 *
 * @see boofcv.alg.tracker.combined.CombinedTrackerScalePoint
 *
 * @param detector Feature detector and describer.
 * @param associate Association algorithm.
 * @param featureRadiusKlt KLT feature radius
 * @param pyramidScalingKlt KLT pyramid configuration
 * @param imageType Input image type.
 * @param <I> Input image type.
 * @param <D> Derivative image type.
 * @param <Desc> Feature description type.
 * @return Feature tracker
 */
public static <I extends ImageSingleBand, D extends ImageSingleBand, Desc extends TupleDesc>
CombinedTrackerScalePoint<I,D,Desc> combined( DetectDescribePoint<I,Desc> detector ,
											  AssociateDescription<Desc> associate ,
											  int featureRadiusKlt,
											  int[] pyramidScalingKlt ,
											  Class<I> imageType ,
											  Class<D> derivType )
{
	KltConfig configKlt =  KltConfig.createDefault();

	PyramidKltForCombined<I,D> klt = new PyramidKltForCombined<I, D>(configKlt,
			featureRadiusKlt,pyramidScalingKlt,imageType,derivType);

	return new CombinedTrackerScalePoint<I, D, Desc>(klt,detector,associate);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:31,代码来源:FactoryTrackerAlg.java

示例4: perform

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
private void perform( BenchmarkFeatureDistort<T> benchmark ) {
	CompileImageResults<T> compile = new CompileImageResults<T>(benchmark);
	compile.addImage("../data/evaluation/outdoors01.jpg");
	compile.addImage("../data/evaluation/indoors01.jpg");
	compile.addImage("../data/evaluation/scale/beach01.jpg");
	compile.addImage("../data/evaluation/scale/mountain_7p1mm.jpg");
	compile.addImage("../data/evaluation/sunflowers.png");

	InterestPointDetector<T> detector = UtilOrientationBenchmark.defaultDetector(imageType,derivType);
	OrientationImageAverage<T> orientation = FactoryOrientationAlgs.nogradient(radius,imageType);
	// comment/uncomment to change the evaluator
	StabilityEvaluator<T> evaluator = new DescribeEvaluator<T,TupleDesc>(border,detector,orientation);

	compile.setAlgorithms(algs,evaluator);

	compile.process();
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:18,代码来源:BenchmarkStabilityDescribe.java

示例5: setActiveAlgorithm

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
@Override
public synchronized void setActiveAlgorithm(int indexFamily, String name, Object cookie) {
	if (detector == null || describe == null || matcher == null)
		return;

	switch (indexFamily) {
		case 0:
			detector = (InterestPointDetector<T>) cookie;
			break;

		case 1:
			describe = (DescribeRegionPoint<T, TupleDesc>) cookie;
			// need to update association since the descriptor type changed
			matcher = createMatcher();
			break;

		case 2:
			associateBackwards = (Boolean)cookie;
			matcher = createMatcher();
			break;
	}

	processImage();
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:25,代码来源:VisualizeAssociationMatchesApp.java

示例6: setActiveAlgorithm

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
@Override
public void setActiveAlgorithm(int indexFamily, String name, Object cookie) {
	switch (indexFamily) {
		case 0:
			detector = (InterestPointDetector<T>) cookie;
			break;

		case 1:
			describe = (DescribeRegionPoint<T, TupleDesc>) cookie;
			break;
	}

	controlPanel.setFeatureType(describe.getDescriptionType());

	processImage();
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:17,代码来源:VisualizeAssociationScoreApp.java

示例7: processImage

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
/**
 * Extracts image information and then passes that info onto scorePanel for display.  Data is not
 * recycled to avoid threading issues.
 */
private void processImage() {
	final List<Point2D_F64> leftPts = new ArrayList<Point2D_F64>();
	final List<Point2D_F64> rightPts = new ArrayList<Point2D_F64>();
	final List<TupleDesc> leftDesc = new ArrayList<TupleDesc>();
	final List<TupleDesc> rightDesc = new ArrayList<TupleDesc>();

	final ProgressMonitor progressMonitor = new ProgressMonitor(this,
			"Compute Feature Information",
			"", 0, 4);
	extractImageFeatures(progressMonitor, 0, imageLeft, leftDesc, leftPts);
	extractImageFeatures(progressMonitor, 2, imageRight, rightDesc, rightPts);

	SwingUtilities.invokeLater(new Runnable() {
		public void run() {
			progressMonitor.close();
			scorePanel.setScorer(controlPanel.getSelected());
			scorePanel.setLocation(leftPts, rightPts, leftDesc, rightDesc);
			repaint();
		}
	});
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:26,代码来源:VisualizeAssociationScoreApp.java

示例8: createFromPremade

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
/**
	 * For some features, there are pre-made implementations of DetectDescribePoint.  This has only been done
	 * in situations where there was a performance advantage or that it was a very common combination.
	 */
	public static <T extends ImageSingleBand, TD extends TupleDesc>
	DetectDescribePoint<T, TD> createFromPremade( Class<T> imageType ) {
		return (DetectDescribePoint)FactoryDetectDescribe.surfStable(
				new ConfigFastHessian(1, 2, 200, 1, 9, 4, 4), null,null, ImageDataType.single(ImageFloat32.class));
		// note that SIFT only supports ImageFloat32
//		if( imageType == ImageFloat32.class )
//			return (DetectDescribePoint)FactoryDetectDescribe.sift(null,new ConfigSiftDetector(2,0,200,5),null,null);
//		else
//			throw new RuntimeException("Unsupported image type");
	}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:15,代码来源:ExampleDetectDescribe.java

示例9: createFromComponents

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
/**
 * Any arbitrary implementation of InterestPointDetector, OrientationImage, DescribeRegionPoint
 * can be combined into DetectDescribePoint.  The syntax is more complex, but the end result is more flexible.
 * This should only be done if there isn't a pre-made DetectDescribePoint.
 */
public static <T extends ImageSingleBand, TD extends TupleDesc>
DetectDescribePoint<T, TD> createFromComponents( Class<T> imageType ) {
	// create a corner detector
	Class derivType = GImageDerivativeOps.getDerivativeType(imageType);
	GeneralFeatureDetector corner = FactoryDetectPoint.createShiTomasi(new ConfigGeneralDetector(1000,5,1), false, derivType);
	InterestPointDetector detector = FactoryInterestPoint.wrapPoint(corner, 1, imageType, derivType);

	// describe points using BRIEF
	DescribeRegionPoint describe = FactoryDescribeRegionPoint.brief(new ConfigBrief(true), imageType);

	// Combine together.
	// NOTE: orientation will not be estimated
	return FactoryDetectDescribe.fuseTogether(detector, null, describe);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:20,代码来源:ExampleDetectDescribe.java

示例10: describeImage

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
/**
 * Detects features inside the two images and computes descriptions at those points.
 */
private static <T extends ImageSingleBand, FD extends TupleDesc>
void describeImage(T image,
				   DetectDescribePoint<T,FD> detDesc,
				   List<Point2D_F64> points,
				   FastQueue<FD> listDescs) {
	detDesc.detect(image);

	listDescs.reset();
	for( int i = 0; i < detDesc.getNumberOfFeatures(); i++ ) {
		points.add( detDesc.getLocation(i).copy() );
		listDescs.grow().setTo(detDesc.getDescription(i));
	}
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:17,代码来源:ExampleImageStitching.java

示例11: createDescription

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
@Test
public void createDescription() {
	// is this interface supported?
	tracker = createTracker();
	if( !(tracker instanceof ExtractTrackDescription) )
		return;

	ExtractTrackDescription extract = (ExtractTrackDescription)tracker;

	TupleDesc desc = extract.createDescription();
	assertTrue( desc != null );
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:13,代码来源:StandardPointTracker.java

示例12: createInstance

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
/**
 * Creates a FastQueue and declares new instances of the descriptor using the provided
 * {@link DetectDescribePoint}.  The queue will have declareInstance set to true, otherwise
 * why would you be using this function?
 */
public static <TD extends TupleDesc>
FastQueue<TD> createQueue( final DescribeRegionPoint<?, TD> detDesc , int initialMax ) {
	return new FastQueue<TD>(initialMax,detDesc.getDescriptionType(),true) {
		@Override
		protected TD createInstance() {
			return detDesc.createDescription();
		}
	};
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:15,代码来源:UtilFeature.java

示例13: pixelRegion

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
public static <T extends ImageSingleBand, D extends TupleDesc>
DescribePointPixelRegion<T,D> pixelRegion( int regionWidth , int regionHeight , Class<T> imageType )
{
	if( imageType == ImageFloat32.class ) {
		return (DescribePointPixelRegion<T,D>)new ImplDescribePointPixelRegion_F32(regionWidth,regionHeight);
	} else if( imageType == ImageUInt8.class ) {
		return (DescribePointPixelRegion<T,D>)new ImplDescribePointPixelRegion_U8(regionWidth,regionHeight);
	} else {
		throw new IllegalArgumentException("Unsupported image type");
	}
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:12,代码来源:FactoryDescribePointAlgs.java

示例14: norm

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
private double norm( TupleDesc desc ) {
	double total = 0;
	for( int i = 0; i < desc.size(); i++ ) {
		total += desc.getDouble(i)*desc.getDouble(i);
	}
	return Math.sqrt(total);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:8,代码来源:DescribeEvaluator.java

示例15: errorNorm

import boofcv.struct.feature.TupleDesc; //导入依赖的package包/类
private double errorNorm( TupleDesc a , TupleDesc b  ) {
	double total = 0;
	for( int i = 0; i < a.size(); i++ ) {
		double error = a.getDouble(i) - b.getDouble(i);
		total += error*error;
	}
	return Math.sqrt(total);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:9,代码来源:DescribeEvaluator.java


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