感兴趣区域检测技术

简介: Boofcv研究:感兴趣区域检测技术public class InterestPoint { public static void detect( BufferedImage image , Class imageType ) { T input = ConvertBufferedImage.

Boofcv研究:感兴趣区域检测技术

public class InterestPoint {

    public static <T extends ImageGray>
    void detect( BufferedImage image , Class<T> imageType ) {
        T input = ConvertBufferedImage.convertFromSingle(image, null, imageType);

        InterestPointDetector<T> detector = FactoryInterestPoint.fastHessian(
                new ConfigFastHessian(10, 2, 100, 2, 9, 3, 4));

        detector.detect(input);

        displayResults(image, detector);
    }

    private static <T extends ImageGray>
    void displayResults(BufferedImage image, InterestPointDetector<T> detector)
    {
        Graphics2D g2 = image.createGraphics();
        FancyInterestPointRender render = new FancyInterestPointRender();


        for( int i = 0; i < detector.getNumberOfFeatures(); i++ ) {
            Point2D_F64 pt = detector.getLocation(i);

            if( detector.hasScale() ) {
                int radius = (int)(detector.getRadius(i));
                render.addCircle((int)pt.x,(int)pt.y,radius);
            } else {
                render.addPoint((int) pt.x, (int) pt.y);
            }
        }
        g2.setStroke(new BasicStroke(3));

        render.draw(g2);
        ShowImages.showWindow(image, "Detected Features", true);
    }

    public static void main( String args[] ) {
        BufferedImage image = UtilImageIO.loadImage(UtilIO.pathExample("D:\\JavaProject\\Boofcv\\example\\sunflowers.jpg"));
        detect(image, GrayF32.class);
    }
}

这里写图片描述

目录
相关文章
|
3月前
|
数据安全/隐私保护 Windows
PDF24 Tools离线版下载,PDF编辑阅读工具
PDF24 Tools是一款免费且易于使用的在线PDF工具合集,支持网页版和Windows客户端。它包含近50个PDF处理工具,如PDF创建、合并、压缩、加密、解密、编辑、提取、转换等,所有功能均可离线使用,无需登录,操作简便。软件界面直观,功能丰富,适合各类PDF文件处理需求,是办公学习的实用工具。下载即用,无限制,完全免费,广受用户好评。
731 6
|
3月前
|
运维 安全 算法
服务器 CPU 占用忽高忽低?排查这 6 个隐藏进程,90% 的异常都能解决
服务器运维中,CPU占用忽高忽低常由隐藏进程引发,影响服务稳定性。本文介绍六大需排查的隐藏进程:异常编译、挖矿程序、内存泄漏、网络请求异常、日志轮转问题及恶意软件。通过排查工具如top、ps、netstat等定位问题进程,并提供针对性解决方法,帮助开发者快速稳定服务器性能。
733 0
|
JSON NoSQL Redis
Redis 作为向量数据库快速入门指南
Redis 作为向量数据库快速入门指南
1012 1
|
API
uni-app点击按钮弹出提示框-uni.showModal(OBJECT),选择确定和取消
uni-app点击按钮弹出提示框-uni.showModal(OBJECT),选择确定和取消
2326 0
|
JavaScript 前端开发 开发者
探索yocto-queue库:替代数组的实现原理与方法
在需要高性能队列结构的场景下,yocto-queue提供了一个轻量级且高效的解决方案。它的实现原理优雅且有效,使得在实际应用中,特别是在性能敏感的环境下,成为了数组的一个强大替代者。通过减少性能开销,yocto-queue使得JavaScript开发者能够构建更快、更可靠的应用程序,从而提高用户体验和应用性能。
118 2
|
运维 监控
平台设计-用户权限体系
首先需要知道一些约束:
|
域名解析 网络协议 Unix
DDNS 简介
一、概念DDNS(Dynamic Domain Name Server)是动态域名服务的缩写!DDNS是将用户的动态IP地址映射到一个固定的域名解析服务上,用户每次连接网络的时候客户端程序就会通过信息传 递把该主机的动态IP地址传送给位于服务商主机上的服务器程序,服务项目器程序负责提供DNS服务并实现动态域名解析。
16613 0
|
机器学习/深度学习 人工智能 安全
一文搞懂隐私计算
一文搞懂隐私计算
4212 0
|
自然语言处理 搜索推荐 Java
SpringBoot整合ElasticSearch
SpringBoot整合ElasticSearch
481 0