Android fastcv c++ 配置 如何加载bitmap图片 及边缘检测函数的使用 win10

一.去高通官网下载SDK并安装

https://developer.qualcomm.com/software/fastcv-sdk

 

二.由于官方提供的SDK 只能在win7上面安装,如果我们需要在win10上面开发可以 在win7上安装后把 安装的文件包拷贝过来使用. 如下图这个文件夹

 

三.我们在Android studio中如何使用 fastcv 【c++库】

       (1).在Android studio 中新建一个 native c++ 的项目

       (2).添加fastcv的静态库

              .在android项目的cpp目录下新建 include 和 lib 文件夹

               在fastcv文件夹中把 fastcv.h 和 libfastcv.a 拷贝进 include 和 lib中

 

 

      (3).在新建好的项目中的CMakeLists.txt中添加如下配置(导入 fastcv的静态库)

set_target_properties( # Specifies the target library.
        lfastcv

        # Specifies the parameter you want to define.
        PROPERTIES IMPORTED_LOCATION

        # Provides the path to the library you want to import.
        ${CMAKE_CURRENT_SOURCE_DIR}/lib/libfastcv.a #${CMAKE_CURRENT_SOURCE_DIR}
       )


find_library( # Sets the name of the path variable.
        log-lib

        # Specifies the name of the NDK library that
        # you want CMake to locate.
        log )

 

target_link_libraries( # Specifies the target library. //在这面只需加上 lfastcv即可
                       native-lib lfastcv
                       # Links the target library to the log library
                       # included in the NDK.
                       ${log-lib} )

 

此时fastcv在android项目中的配置已经成功了

 

四.如何使用设置bitmap格式并且在fastcv中使用

java部分

 

其中CannyImage()函数属于c++中的函数调用 通过此函数传递bitmap图片在c++中用fastcv处理

 

c++ 部分  其中fcvFilterCanny3x3u8()函数属于 fastcv中的边缘检测

 

 

 

如果需要这个项目请给我留言

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值