一.去高通官网下载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中的边缘检测
如果需要这个项目请给我留言