• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ImageType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getResolvedImage

import boofcv.struct.image.ImageType; //导入依赖的package包/类
public BufferedImage getResolvedImage(BufferedImage src)
{
	Planar<GrayF32> input = ConvertBufferedImage.convertFromMulti(src, null, true, GrayF32.class);

	RemovePerspectiveDistortion<Planar<GrayF32>> removePerspective =
			new RemovePerspectiveDistortion<>(300, 300, ImageType.pl(3, GrayF32.class));

	if( !removePerspective.apply(input,
			new Point2D_F64(points[0].x,points[0].y),
			new Point2D_F64(points[1].x,points[1].y),
			new Point2D_F64(points[2].x,points[2].y),
			new Point2D_F64(points[3].x,points[3].y)
							) ){
		return null;
	}

	Planar<GrayF32> output = removePerspective.getOutput();
	return ConvertBufferedImage.convertTo_F32(output,null,true);
}
 
开发者ID:ForOhForError,项目名称:MTG-Card-Recognizer,代码行数:20,代码来源:CardCandidate.java


示例2: EquirectangularToPinhole

import boofcv.struct.image.ImageType; //导入依赖的package包/类
public EquirectangularToPinhole() {
    ImageType<Planar<GrayU8>> imageType = ImageType.pl(3,GrayU8.class);

    InterpolatePixel<Planar<GrayU8>> interp = FactoryInterpolation.
            createPixel(0, 255, InterpolationType.BILINEAR, BorderType.EXTENDED, imageType);
   distorter = FactoryDistort.distort(false,interp,imageType);
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:8,代码来源:EquirectangularToPinhole.java


示例3: removePerspectiveDistortion

import boofcv.struct.image.ImageType; //导入依赖的package包/类
public static Planar<GrayF32> removePerspectiveDistortion(BufferedImage image, Quadrilateral_F64 quad, int targetWidth, int targetHeight) {

        // see http://boofcv.org/index.php?title=Example_Remove_Perspective_Distortion
        Planar<GrayF32> input2 = ConvertBufferedImage.convertFromMulti(image, null, true, GrayF32.class);

        RemovePerspectiveDistortion<Planar<GrayF32>> removePerspective =
                new RemovePerspectiveDistortion<>(targetWidth, targetHeight, ImageType.pl(3, GrayF32.class));

        double len1 = quad.getSideLength(0) + quad.getSideLength(2);
        double len2 = quad.getSideLength(1) + quad.getSideLength(3);
        Point2D_F64 corner0, corner1, corner2, corner3;
        if (targetWidth < targetHeight) {
            if (len1 > len2) {
                corner0 = quad.b;
                corner1 = quad.c;
                corner2 = quad.d;
                corner3 = quad.a;
            } else {
                corner0 = quad.a;
                corner1 = quad.b;
                corner2 = quad.c;
                corner3 = quad.d;
            }
        } else {
            if (len1 < len2) {
                corner0 = quad.b;
                corner1 = quad.c;
                corner2 = quad.d;
                corner3 = quad.a;
            } else {
                corner0 = quad.a;
                corner1 = quad.b;
                corner2 = quad.c;
                corner3 = quad.d;
            }
        }
        if (!removePerspective.apply(input2, corner0, corner1, corner2, corner3)) {
            throw new RuntimeException("Failed!?!?");
        }

        return removePerspective.getOutput();
    }
 
开发者ID:tomwhite,项目名称:set-game,代码行数:43,代码来源:GeometryUtils.java


示例4: SimpleDetectDescribePoint

import boofcv.struct.image.ImageType; //导入依赖的package包/类
public SimpleDetectDescribePoint(DetectDescribePoint<T, Desc> detectDescribe, ImageType<T> imageType ) {
	this.detectDescribe = detectDescribe;

	input = imageType.createImage(1,1);
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:6,代码来源:SimpleDetectDescribePoint.java


示例5: getImageType

import boofcv.struct.image.ImageType; //导入依赖的package包/类
public ImageType getImageType() {
	return image.getImageType();
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:4,代码来源:SimpleImage.java


示例6: getInputType

import boofcv.struct.image.ImageType; //导入依赖的package包/类
@Override
public ImageType<ImageFloat32> getInputType() {
	return ImageType.single(ImageFloat32.class);
}
 
开发者ID:lessthanoptimal,项目名称:IpolOpticalFlow,代码行数:5,代码来源:IpolBroxSpacial_to_DenseOpticalFlow.java


示例7: getHOGDescriptors

import boofcv.struct.image.ImageType; //导入依赖的package包/类
/**
 * Returns HOG descriptors for an image using the provided settings.
 *
 * @param image Image for which to obtain the HOG descriptors.
 * @param config ConfigDenseHog object that specifies the parameters for the HOG algorithm.
 * @return DescribeImageDense object containing the HOG descriptor.
 */
public static DescribeImageDense<GrayU8,TupleDesc_F64> getHOGDescriptors(BufferedImage image, ConfigDenseHoG config) {
    GrayU8 gray = ConvertBufferedImage.convertFromSingle(image, null, GrayU8.class);
    DescribeImageDense<GrayU8,TupleDesc_F64> desc = FactoryDescribeImageDense.hog(config, ImageType.single(GrayU8.class));
    desc.process(gray);
    return desc;
}
 
开发者ID:vitrivr,项目名称:cineast,代码行数:14,代码来源:HOGHelper.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TravelMode类代码示例发布时间:2022-05-23
下一篇:
Java BlockSequenceStartToken类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap