Luxand_FaceSDK_Documentation

合集下载

IDOL KeyView Filter SDK 软件版本 12.12.0 发行说明书

IDOL KeyView Filter SDK 软件版本 12.12.0 发行说明书

Document Release Date:June2022 Software Release Date:June2022Legal notices©Copyright2022Micro Focus or one of its affiliates.The only warranties for products and services of Micro Focus and its affiliates and licensors(“Micro Focus”)are as may be set forth in the express warranty statements accompanying such products and services.Nothing herein should be construed as constituting an additional warranty.Micro Focus shall not be liable for technical or editorial errors or omissions contained herein.The information contained herein is subject to change without notice.Documentation updatesThe title page of this document contains the following identifying information:l Software Version number,which indicates the software version.l Document Release Date,which changes each time the document is updated.l Software Release Date,which indicates the release date of this version of the software.To check for updated documentation,visit https:///support-and-services/documentation/.SupportVisit the MySupport portal to access contact information and details about the products,services,and support that Micro Focus offers.This portal also provides customer self-solve capabilities.It gives you a fast and efficient way to access interactive technical support tools needed to manage your business.As a valued support customer,you can benefit by using the MySupport portal to:l View information about all services that Support offersl Submit and track service requestsl Contact customer supportl Search for knowledge documents of interestl View software vulnerability alertsl Enter into discussions with other software customersl Download software patchesl Manage software licenses,downloads,and support contractsMany areas of the portal require you to sign in.If you need an account,you can create one when prompted to sign in.ContentsNew in this Release4 Resolved Issues6 Requirements8 Notes9 Documentation10New in this ReleaseThis section lists the enhancements to KeyView Filter SDK version12.12.0.l KeyView format detection has been extended,with support for30additional file formats.By identifying a larger range of formats present in the enterprise,decisions can be made on how to route,filter,or alert on such documents.For the full list,refer to the KeyView Filter SDKProgramming Guides.l(Security update)KeyView has been hardened against DLL and shared library preloading attacks.KeyView now only loads shared libraries from the specified bin directory.l(Security update)To improve security,WINDOWS_X86and WINDOWS_X86_64binaries are built with Control Flow Guard enabled.l Tagged Image File Format(TIFF)support has been extended to handle a wider range of TIFF subsets and extensions.l KeyView now includes data labels from charts in Microsoft Excel(xlsx)format documents in the filter output.l When processing Microsoft Excel(XLSX)files with cells that contain rich data,like Stocks or Geography,KeyView now outputs the value of those cells,for example the company or country name.Rich Data types were added to Excel in version1810(Build11001.20074).l KeyView now filters text from threaded comments directly,instead of getting the text from the legacy comment placeholder.Threaded comments were added to Excel in Version1810(Build 11001.20074).You can still filter text from the legacy placeholders by using KVFLT_SHOWHIDDENTEXT.l The following improvements have been made for filtering XLSX files when KVFLT_ SHOWHIDDENTEXT is turned on:o KeyView now filters the names of Sheet Views,which were added to Excel in version2007 (Build13029.20308).o When filtering threaded comments with@mentions,KeyView now includes the email addresses associated with the person mentioned.These comments were added to Excel in Version1902(Build11328.20146).l KeyView now handles files which contain embedded PHP,but are otherwise valid HTML files.Any embedded PHP is excluded from the output.If you have set KVFLT_SHOWHIDDENTEXT,KeyView outputs the skipped PHP after the HTML content.l Improved support for embedded images in MS_Outlook_Fmt(.msg)files.KeyView can now corrctly interpret embedded image references that use content-ids,and modifies the extracted HTML body so that browsers can resolve the image URLs.l You can now configure out-of-process pipe-streaming while a program is running,not just in the formats.ini configuration:o C API: use the KVFLT_FILTERPIPESTREAMING and KVFLT_EXTRACTPIPESTREAMING options in the fpFilterConfig function.o Java API: use filter_streaming_method and extract_streaming_method.o C++API: use the extract_pipe_streaming and filter_pipe_streaming methods in the Configuration class. API: use the FilterPipeStreaming and ExtractPipeStreaming properties on the Filter object.l When you call fpFilterConfig to configure the directory that KeyView should use to store temporary files,the function returns FALSE if the target directory does not exist or is otherwise inaccessible.l When you filter or export an RMS-encrypted Office or RPMSG file but have not specified RMS credentials,KeyView returns a new error code,KVError_RMSCredentialsRequired.Previous versions of KeyView returned KVERR_PasswordProtected.This does not apply to RMS-encrypted pFiles and PDFs,because KeyView can perform some processing of these formats without RMS credentials.l The C sample programs that contain an embedded trial license can also read license information from environment variables.This allows you to continue to use a program after the embedded trial license has expired,and makes it easy to test or troubleshoot with your own license.l The Java sample programs have been updated to provide license information through the API,because using a license file(kv.lic)was deprecated in an earlier release.The compiled binaries that are supplied in the SDK have an embedded trial license,which expires approximately five months after release.If the environment variables KV_SAMPLE_ PROGRAM_LICENSE_ORGANIZATION and KV_SAMPLE_PROGRAM_LICENSE_KEY are set then those values are used instead,so that you can use the programs after the embedded trial license has expired,and test or troubleshoot with your own license.l The libtiff third-party library has been upgraded to version4.3.0.l The fpGetSummaryInfo and fpGetSummaryInfoFile functions now return some finer-grained error codes.In particular,they return KVERR_FormatNotSupported when the file is not of a type supported for getting summary info.l The pxlsr reader has been added for filtering HP PCL XL documents.Resolved IssuesThe following issues were resolved in KeyView Filter SDK version12.12.0.l(Security update)The third-party OpenSSL library was updated to version1.1.1n to resolve a security vulnerability,CVE-2022-0778.l The Java API could terminate unexpectedly when used to extract sub-files,if it was being used from multiple threads.l When attempting to extract a file whose format could not be detected,the API would return KVERR_AutoDetFail rather than KVERR_AutoDetNoFormat.l(Security update)KeyView could terminate unexpectedly(in-process),or report an error(out-of-process) when attempting to process some TAR archive format(.tar)files containing very long subfile names.l When processing some PDFs using the reader pdfsr,KeyView could fail to output some text or could output meaningless characters instead of the correct contents of the file.l KeyView did not output some annotations from PDF files.l(Security update)KeyView could stop responding(in-process)or time out(out-of-process) when attempting to process malicious PDF files with invalid page trees.l(Security update)KeyView could use an excessive amount of memory and stop responding (in-process)or time out(out-of-process)when attempting to process some corrupt Microsoft OneNote(.one)files.l Some numbers in Microsoft Excel(.xlsx)files were formatted incorrectly if the global locale had been modified by the calling code.l When processing dates in some Microsoft Excel(.xlsx)files,KeyView would output a date4 years later than the correct date.l When filtering Microsoft Excel(.xlsx)files,some text could be missed from sheets with lots of images or charts.l In Microsoft Word(.docx)files,text from an Ask field was incorrectly included in the output.This text is now included only when you enable the option to show hidden text.l KeyView would output extra list markers for some Microsoft Word(.docx)files(bullets or numbers not shown when the file was opened in Word).l(Security update)When processing RMS protected files out-of-process,KeyView would sometimes fail to remove some of the temporary files it created.l When extracting images from PDF files using pdfsr,KeyView sometimes created invalid TIFF images that had the wrong colormap size.l KeyView could incorrectly decode some images when extracting from PDF files using the reader pdfsr.l(Security update)When configured to run in-process and being called from multiple threads, KeyView could exit unexpectedly when extracting XMP metadata from one of the file formats for which support was added in12.6.l Getting summary info could take a long time because the out-of-process server(KVOOP) restarted when the file was not of a type supported for getting summary info.RequirementsRequirementsFor information about supported platforms,supported compilers,and software dependencies for the KeyView Filter SDK,refer to the KeyView Filter SDK Programming Guides.NotesNotesl KeyView12.12requires a later version of the Visual C++Redistributables than were required by KeyView12.11.The redistributables are provided in the vcredist folder of the KeyViewSDK but you can download the latest installers from Microsoft to get the latest security,reliability,and performance improvements.l In the Filter C API,when calling fpInit()or fpInitWithLicenseData(),the pDynLink argument must be NULL.The(undocumented)ability to pass a non-null value has beenremoved.Deprecated FeaturesThe following features are deprecated and might be removed in a future release.DocumentationDocumentationThe following documentation was updated for KeyView Filter SDK version12.12.0.l KeyView Filter SDK C Programming Guidel KeyView Filter SDK C++Programming Guidel KeyView Filter SDK Java Programming Guidel KeyView Filter Programming Guide。

博奥智能人脸识别算法SDK

博奥智能人脸识别算法SDK

人脸识别算法SDK V1.0 标准版产品白皮书一、产品概述随着人们对安全问题的不断重视,生物特征识别技术以其可靠性,有效性和安全性得到了越来越多的关注。

人脸识别技术作为生物特征识别技术的一种,以其独特的友好性,近年来已成为了国际上的一个重点课题,视觉科技是以视觉算法为核心,专注于高精度,小型化的人脸识别技术,公司所研发的人脸识别模型在刷脸支付,智慧园区、智慧校园等多领域应用广泛。

博奥智能人脸识别SDK V1.0 标准版是视觉针对各种线下识别场景封装的“业务型”人脸识别算法SDK,主要封装了人脸识别通用功能,如人脸检测、活体检测、人脸搜索等,方便客户二次开发。

客户既可以自由组合原子化接口,也可基于封装的应用模式做集成开发。

二、功能模块标准版SDK客户端支持安卓系统,主要用于人脸识别终端设备,例如;人脸门禁机、电子班牌、刷脸支付终端、人脸考勤机等。

方便,快捷,快速精准的处理和反馈给户所识别的结果。

客户端SDK功能三、核心模块博奥智能人脸识别技术是以身份检索或校验为目标,通过从给定的静态或动态图像中提取人脸信息等手段,与数据库中已知身份人脸进行匹配的过程。

影响人脸识别的关键因素有两个;人脸底库、识别算法。

底库管理底库是一个用于识别的人员数据集合,集合是由多个人员数据组成,每个人员的数据由人员编码、人员分组、人员信息及多张人脸特征组成,将这些人脸特征与人脸ID 关联在一起,搜索时,匹配到某个人脸特征,即搜到了相关联的人员编码及其对应的人员信息。

几个字段解释如下;底库是通过人脸注册建立的,人脸注册流程如下1)获取人脸照片,可从服务端下载或本地拍照获取。

2)检测人脸质量,底库的人脸质量是影响识别准确率的关键因素之一。

可以根据场景选择不同的质量分数作为入库标准,低于标准的照片将不能入库。

3)提取人脸特征,用特征提取模型提取照片中的人脸特征。

4)人脸特征入库,将从人脸照片中提取到的人脸特征及人脸ID、人脸分组、人脸信息添加到底库中。

百度离线人脸识别sdk的使用

百度离线人脸识别sdk的使用

百度离线⼈脸识别sdk的使⽤1.1下载sdk运⾏百度离线⼈脸识别sdk的使⽤1.2配置环境添加⾄项⽬,可以拖动复制或者以类库形式添加face-resource此⽂件夹放到根⽬录上⼀层激活⽂件与所有dll引⽤放到根⽬录嫌⿇烦可以将sdk的根⽬录所有⽂件直接拖动⾄项⽬的根⽬录1.3 使⽤百度离线⼈脸识别sdk只⽀持Release⽅式运⾏,所以项⽬的配置也改为此⽅式(不然会提⽰baiduapi…….⼀系列dll找不到)sdk使⽤OpenCvSharp3-AnyCPU的引⽤static class Program{///<summary>///应⽤程序的主⼊⼝点。

///</summary>[UnmanagedFunctionPointer(CallingConvention.Cdecl)]delegate void FaceCallback(IntPtr bytes, int size, String res);// sdk初始化[DllImport("BaiduFaceApi.dll", EntryPoint = "sdk_init", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]private static extern int sdk_init(bool id_card);// 是否授权[DllImport("BaiduFaceApi.dll", EntryPoint = "is_auth", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]private static extern bool is_auth();// 获取设备指纹[DllImport("BaiduFaceApi.dll", EntryPoint = "get_device_id", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]private static extern IntPtr get_device_id();// sdk销毁[DllImport("BaiduFaceApi.dll", EntryPoint = "sdk_destroy", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]private static extern void sdk_destroy();// 测试获取设备指纹device_idpublic static void test_get_device_id(){IntPtr ptr = get_device_id();string buf = Marshal.PtrToStringAnsi(ptr);Console.WriteLine("device id is:" + buf);}[STAThread]static void Main(){bool id = false;int n = sdk_init(id);if (n != 0){Console.WriteLine("auth result is {0:D}", n);Console.ReadLine();}// 测试是否授权bool authed = is_auth();Console.WriteLine("authed res is:" + authed);test_get_device_id();Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDefault(false);Application.Run(new Form1());}}使⽤时将Program类修改,不然⽆法使⽤⼈脸检测接⼝错误报告为参数⾮法回传 -11.3.1 ⼈脸图⽚检测⽅法[DllImport("BaiduFaceApi.dll", EntryPoint = "track", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]private static extern IntPtr track(string file_name, int max_track_num);public void test_track(){// 传⼊图⽚⽂件绝对路径string file_name = "d:\\kehu2.jpg";int max_track_num = 1; // 设置最多检测⼈数(多⼈脸检测),默认为1,最多可设为10IntPtr ptr = track(file_name, max_track_num);string buf = Marshal.PtrToStringAnsi(ptr);Console.WriteLine("track res is:" + buf);}⼈脸检测接⼝,此⽅法需要在d盘根⽬录放⼀张名为“kehu2.jpg”的图⽚来检测是否含有⼈脸。

安卫士SDK说明书

安卫士SDK说明书

安卫士sdk说明书二零一七年十一月文档目的及适用人员版本控制批准控制目录1.产品说明 (4)1.1产品架构 (4)1.2产品特点 (4)2.SDK说明 (5)2.1WINDOWS版本 (6)2.2IOS版本 (7)2.3ANDROID版本(A NDROID S TUDIO) (9)2.4ANDROID版本(E CLIPSE) (11)2.5易语言版本 (15)1.产品说明1.1产品架构“安卫士”安全接入系统由“安全接入客户端组件(sdk、加壳等等)”、“安全接入服务器机房群集”、“单实例控制面板”三大核心子系统构成。

用户通过集成安全接入组件将原来客户端程序直接连接后端应用服务的模式改成客户端通过127的IP地址连接本地的安全接入组件,安全接入组件会动态选择延迟最小的链路将数据转发到安全接入机房服务器群集,安全接入机房服务器群集再将数据转发到用户的后端应用服务器。

整个转发过程都会对客户端的真实性进行加密验证,链路切换时会对连接状态进行保持,确保TCP连接不中断。

1.2产品特点1.“安卫士”安全接入系统是新一代的智能分布式云接入系统,接入节点采用多机房集群部署模式,某个机房出现故障或攻击导致链路拥塞的特殊情况下接入通道会自动调整到其他流畅节点。

2.用户连接状态在各机房之间是实时同步的,节点切换过程中用户无感知,并且保持TCP连接不中断。

3.安卫士安全接入系统在多机房、多线路、高防护的基础上部署,DDOS总体防护能力超过2TB,可以有效杜绝大流量DDOS攻击。

对所有的连接都会通过加密验证,检查连接的真实性,过滤掉所有不真实的连接,实现大规模多样化CC攻击无误封,并有效避免服务器的IP地址外泄,有效杜绝服务器被入侵。

4.客户端组件同时开启多路径,并且选择最优路径进行数据转发,当选择出来的最优路径出现波动会自动重新选择新的最优路径。

无论你的服务器在哪里,都可以通过安卫士平台接入。

5.采用“安卫士”接入系统后,大批量减少接入节点服务的投入,降低服务器及运维成本。

NetSDK编程指导手册(大华)

NetSDK编程指导手册(大华)
前言
目的
欢迎使用 NetSDK(以下简称 SDK)编程指导手册。 SDK 是软件开发者在开发网络硬盘录像机、网络视频服务器、网络摄像机、网络球机和智能设备 等产品监控联网应用时的开发套件。
本文档详细描述了开发包中各个函数的功能、接口以及函数之间的调用关系,并提供了代码示例。
符号约定
在本文档中可能出现下列标志,它们所代表的含义如下。
1.1 概述 .............................................................................................................................................. 1 1.2 环境要求 ....................................................................................................................................... 2 第 2 章 主要功能 ...................................................................................................................................... 3 2.1 SDK 初始化 ................................................................................................................................... 3

NVIDIA Capture SDK Sample Description Document 201

NVIDIA Capture SDK Sample Description Document 201

2.9 NvFBCEnableAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.10 NvFBCToSys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4
Module Documentation
2.2 NvFBCCudaNvEnc
This sample demonstrates how to use the NvFBCToCuda interface to copy the desktop into a CUDA buffer. From the CUDA buffer, this is then mapped directly to NVENC, where the NVENC hardware video encoder can encode the stream. We recommend that developers use the NVIDIA Video Codec to utilize the NVENC hardware video Encoder. This sample provides a useful wrapper class around the NVENC API, in Encoder.h.
Reader.h: Declares the Reader class, this class is simply a wrapper around the NVENC reader API.

新思科技光学解决方案客户技术支持使用指南说明书

新思科技光学解决方案客户技术支持使用指南说明书

新思科技光学解决方案客户技术支持使用指南(2022.12版)目录一 、简介1.服务对象2.平台使用注意事项3.关于软件版本4.客户支持服务内容二、 SolvNetPlus 技术资源整合平台1.SolvNetPlus 注册及登入方法2.下载软件安装程序、授权档案3.Learning Center 线上学习平台4.咨询技术问题三、常见问题一、 简介感谢您使用新思科技光学产品(软件和设备)。

为了提供更好的服务,我们为软件 (CODE V、LightTools、LucidShape 产品系列、RSoft 产品系列)在租赁或维护期内的用户,以及购买硬件测量设备(Mini-DiffV2、Mini-Diff VPro、REFLET、TIS Pro)的用户提供技术支持和服务。

我们使用 SolvNetPlus 技术资源整合平台提供软件与授权文件下载、线上课程学习(Learning Center)以及线上技术支持。

1.服务对象我们对以下用户提供技术支持和服务●软件维护期内用户●软件租赁期内用户●硬件测量设备用户2.平台使用注意事项我们在技术支持过程中会涉及光学专业术语,因此我们预设您对光学术语已经有所了解。

建议您参考光学书籍,也可通过 Learning Center 观看线上学习平台学习基础课程相关知识。

3.关于软件版本我们建议您使用最新版本软件,如您的软件未更新至最新版,请提前告知。

旧版软件可能导致无法正确的回答您所提出的问题,因此我们建议您将软件更新至最新版,以便我们对您的问题作出最确切的回答。

4.客户支持服务内容●软件下载与获取授权文件●常见问题锦集(FAQ)●下载手册、技术文件、范例模型、宏程序范例●有关光学软件和设备软件的安装和启动问题●光学软件和设备软件的操作问题●光学软件和设备软件的故障排查●光学测量设备的操作问题●线上光学软件培训课程、网络研讨会录播视频及讲义(Learning Center)●光学产品技术研讨会(点击查看)如需获得以上服务,请先在 SolvNetPlus 技术资源整合平台进行注册,具体注册方式请见点此。

脸部识别登录Ubuntu

脸部识别登录Ubuntu

脸部识别登录Ubuntu部识别软件可能不是什么新东西,但你知不知道可以用普通摄像头登录到你的Ubuntu桌面呢?使用pam-face-authentication脸部识别工具,登录到Unbuntu只需要你的一个优雅的傻笑。

它是专门为日常使用的普通用户而设计的。

文件依赖关系要安装和运行这个功能需要先安装一些依赖关系文件。

我们为了节省一些时间,一起安装它们。

打开一个终端(应用程序>附件>终端),然后输入下面的代码:Lucid用户:sudo apt-get install build-essential cmake qt4-qmake libx11-dev libcv-dev libcvaux-dev libhighgui4 libhighgui-dev libqt4-dev libpam0g-dev libswscale0Maverick 用户:sudo apt-get install build-essential cmake qt4-qmake libx11-dev libcv-dev libcvaux-dev libqt4-dev libpam0g-dev libswscale0 libhighgui-dev libhighgui2.1然后继续分别执行下面的命令,执行完一个才进入下一个。

cd /tmpwget /files/pam-face-authentication-0.3.tar.gz tar zxf pam-face-authentication-0.3.tar.gz && cd pam-face-authentication-*mkdir build && cd buildcmake -D CMAKE_INSTALL_PREFIX=/usr ..makesudo make install现在运行“脸部识别练习”程序,在菜单“程序> 其他”里面打开。

讯飞移动广告平台iOS SDK接入指南

讯飞移动广告平台iOS SDK接入指南

科大讯飞股份有限公司iFLYTEK CO.,LTD讯飞移动广告平台iOS SDK接入指南SDK Version: 1.4_IFLY_betaUpdated: 2015.01.16移动广告投放系统SDK集成指南讯飞移动广告平台/,中国最大的移动交互式广告平台。

平台凭借优质的广告资源、精准的数据分析、高效稳定的收益效果、智能多维的交互形式,为开发者带来强悍稳定的变现能力,致力于构建一个高质、高效的广告技术服务平台。

讯飞移动广告平台聚焦移动广告聚合优化,通过先进的收入优化算法和简单易用的管理界面,帮助开发者快速实现应用变现,大幅提高移动广告收入。

独创的智能语音交互广告,打破了传统广告交互形式,让广告变得更生动有趣,从而带来极致的广告体验和最高效的广告收益。

1移动广告投放系统SDK集成指南31. 在 ViewController 的实现文件中初始化并预加载广告,之后在合适的时机进行展现:2. 实现IFLYBannerAdDelegate 方法:
您可以通过实现 IFLYBannerAdDelegate 中定义的方法,来跟踪插屏广告生命周期中的各个阶段,这些方法定义如下:3. 请求广告2.1 添加插屏广告1. 在想要导入广告的ViewController 头文件中导入头文件并声明实例:3. 实现 InterstitiaAdlDelegate 方法:
您可以通过实现 InterstitiaAdlDelegate 中定义的方法,来跟踪插屏广告生命周期中的各个 阶段,这些方法定义如下:移动广告投放系统SDK集成指南#pragma mark IFLYInterstitialAd DelegateMethod- (void)interstitialAdReceive{[_interstitialAd showAd];}- (void)interstitialAdFailedByErrorCode:(ErrorDescription*)errorCode{}- (void)interstitialAdClosed{}- (void) interstitialAdClicked{}4.请求广告[_interstitialAd loadAdWithAdUnitId:@"YOUR ADID"AndAppId:@"YOUR APPID"];2.2添加全屏屏广告1.在想要导入广告的ViewController 头文件中导入头文件并声明实例:#import "IFLYAdFullScreenController.h"@interface FullScreenViewController : UIViewController<IFLYFullScreenAdDelegate>@end2.在ViewController 的实现文件中初始化并预加载广告,之后在合适的时机进行展现://设置自动关闭时间,默认3秒。

大华网络SDK开发手册

大华网络SDK开发手册

大华网络SDK编程手册VERSION 3.1.8(Build 070321)2007-3-21版权所有侵权必究前言非常感谢您使用我们公司的设备,我们将为您提供最好的服务。

本手册可能包含技术上不准确的地方或印刷错误,欢迎指正。

我们将会定期更新手册的内容。

修订记录目录1 简介 (8)1.1概述 (8)1.2适用性 (9)1.3特色功能 (9)2 设计原则 (11)2.1编程说明 (11)2.2典型调用顺序 (12)3 数据结构定义 (18)3.1客户端数据结构 (18)3.1.1 设备信息结构 (25)3.1.2 时间信息 (26)3.1.3 录像文件信息 (26)3.1.4 设备状态信息 (27)3.1.5 系统配置信息结构 (35)4 接口定义 (36)4.1SDK初始化 (36)4.2状态侦听 (39)4.3字符叠加 (44)4.4设备注册 (45)4.5实时监视 (48)4.6音频控制 (54)4.7数据保存 (56)4.8视频抓图 (63)4.9回放和下载 (64)4.10回放控制 (82)4.11云台控制 (88)4.12实时预览 (93)4.13系统配置 (94)4.14日志管理 (103)4.15透明串口 (105)4.16远程控制 (109)4.17录像控制 (112)4.18系统时间 (114)4.19用户管理 (115)4.20语音对讲 (119)4.21码流统计 (129)4.22IO控制 (130)4.23强制I帧 (131)4.24设置限流 (132)4.25获取设备状态 (133)4.26修改通道名称 (136)4.27DDNS查询IP (136)4.28设备参数配置 (138)5 示例功能实现 (165)5.1连接设备 (166)5.2报警信息获取 (167)5.3系统配置 (168)5.4实时监视 (168)5.5数据保存 (169)5.6回放/下载和进度指示 (169)5.7播放控制 (169)5.8预览 (170)5.9字符叠加 (170)1简介1.1概述欢迎使用大华网络SDK编程手册,网络客户端软件开发包(DVR客户端SDK)是大华网络硬盘录像机、网络视频服务器的配套产品,本文档详细描述了开发包中各个函数实现的功能、接口及其函数之间的调用关系和示例实现。

Adobe Acrobat SDK 开发者指南说明书

Adobe Acrobat SDK 开发者指南说明书
Please remember that existing artwork or images that you may want to include in your project may be protected under copyright law. The unauthorized incorporation of such material into your new work could be a violation of the rights of the copyright owner. Please be sure to obtain any permission required from the copyright owner.
This guide is governed by the Adobe Acrobat SDK License Agreement and may be used or copied only in accordance with the terms of this agreement. Except as permitted by any such agreement, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe. Please note that the content in this guide is protected under copyright law.

FaceSDK 3函数解释

FaceSDK 3函数解释

FSDK_LoadImageFromFile从文件中载入一副图像,并且为该图像提供一个内部的句柄。

函数原型int FSDK_LoadImageFromFile(HImage* Image, char* FileName);Image 是指向一个HImage 类型变量的指针,用来接收为该图像文件分配的内部句柄。

FileName 所要载入文件的文件名,FaceSDK 支持JPG,PNG,BMP 三种图像文件格式。

如果函数调用成功返回FSDKE_OK ,否则返回 FSDKE_FAILED。

FSDK_SaveImageToFile把图像保存到文件中去,在保存jpg 类型文件的时候,可以通过函数FSDK_SetJpegCompressionQuality( )来设置图像的压缩质量。

函数原型int FSDK_SaveImageToFile(HImage Image, char* FileName);Image 为要保存图像的内部句柄。

FileName 是图像文件要保存的文件名。

如果函数调用成功返回FSDKE_OK ,否则返回 FSDKE_FAILED。

FSDK_LoadImageFromBuffer从缓冲区中载入一副图像,并且为该图像分配一个内部句柄。

该函数建议图像数据按照- top - to - bottom 顺序。

并且相邻行之间ScaleLine 字节。

该函数一共支持一下几种图像模式.Mode Name MeaningFSDK_IMAGE_GRAYSCALE_8BIT 8位的灰度图像FSDK_IMAGE_COLOR_24BIT 24位的彩色图像(R,G,B顺序)FSDK_IMAGE_COLOR_32BIT 32位的彩色图像带有alpha通道(R,G,B,alpha顺序)这个函数在.NET框架下并不支持,建议用FSDK_LOADIMAGEFROMHBITMAP()函数代替。

函数原型int FSDK_LoadImageFromBuffer(HImage* Image, unsigned char* Buffer, int Width, int Height, int ScanLine, FSDK_IMAGEMODE ImageMode);Image 为图像分配的内部句柄Buffer 图像缓冲区Width 图像宽度Height 图像高度ScanLine 扫描线宽度FSDK_IMAGEMODE 所使用的图像模式。

IPCAM CGI SDK 2.1 用户指南说明书

IPCAM CGI SDK 2.1 用户指南说明书

IPCAM CGI SDK 2.1ContentsIPCAM CGI User Guide (1)summary (3)snapshot.cgi (3)videostream.cgi (4)get_status.cgi (4)decoder_control.cgi (5)camera_control.cgi (6)reboot.cgi (6)restore_factory.cgi (7)get_params.cgi (7)upgrade_firmware.cgi (9)upgrade_htmls.cgi (9)set_alias.cgi (10)set_datetime.cgi (10)set_users.cgi (10)set_devices.cgi (11)set_network.cgi (11)set_wifi.cgi (12)set_pppoe.cgi (12)set_upnp.cgi (12)set_ddns.cgi (13)set_ftp.cgi (13)set_mail.cgi (14)set_alarm.cgi (14)summaryThe CGI APIs is based on http protocal.Different CGI with different Permissions:visitor、operator and Administrator. In this article cgi only support get and post method. upgrade_firmware.cgi and upgrade_htmls.cgi only support post method,otherscgi only support get method.next_url:an option param. If you don’t want only return a simple “OK” when set succeed,you can add a param in the end——next_url.The param is the next file it jump to when set succeed.The param must be a Relative path.Get: (Example)<form action=”/set_mail.cgi”><input name=”svr”><input name=”user”><input name=”pwd”><input name=”sender”><input name=”receiver1”><input name=”receiver2”><input name=”receiver3”><input name=”receiver4”><input type=hidden name=”next_url” value=”index.htm”><input type=submit value=”ok”></form>Post : (Example)<form action=”upgrade_firmware.cgi?next_url=index.htm” method=”post”enctype=”multipart/form-data”><input type=”file” name=”file” size=”20”></form>snapshot.cgidescription To obtain the snapshotPermission visitorSyntax /snapshot.cgi[?user=&pwd=&next_url=]Parameters user:usernamepwd:passwordnext_url:the name of snapshotNote 1 If not use the parameter “next_url”, the snapshot name is:device id(Alias)_ Current time.jpg2 Use “next_url” (for example:next_url=1 the name of photo:1.jpg)3 support 2 Authentication Metheds: http Basic64 encode and useusername/password in the param directly.videostream.cgidescription Use server push mode to send videostream to Client APPPermission visitorSyntax /videostream.cgi[?user=&pwd=]Parameters user:usernamepwd:passwordNote support 2 Authentication Metheds: http Basic64 encode and use username/password in the param directly.get_status.cgidescription To obtain the Device status info.Permission visitorSyntax /get_status.cgireturn now:The count of seconds form 1970-1-1 0:0:0 to nowalarm_status:0:no alarm; 1:motion alarm; 2:input alarmddns_status:DDNS status(details see below)upnp_status:UPNP status(details see below)Note support 2 Authentication Metheds: http Basic64 encode and use username/password in the param directly.ddns_statusReturn descriptionAction0 No1 It’sconnecting…2 Can’t connect to the ServerSucceed3 Dyndns4 DynDns Failed: Server Error5 DynDns Failed: Incorrect User or Password6 DynDns Failed: Need Credited User7 DynDns Failed: Illegal Host Format8 DynDns Failed: The Host Does not Exist9 DynDns Failed: The Host Does not Belong to You10 DynDns Failed: Too Many or Too Few Hosts11 DynDns Failed: The Host is Blocked for Abusing12 DynDns Failed: Bad Reply from Server13 DynDns Failed: Bad Reply from Server14 Oray Failed: Bad Reply from Server15 Oray Failed: Incorrect User or Password16 Oray Failed: Incorrect HostnameSucceed17 Oray18 Reserved19 Reserved20 Reserved21 Reservedupnp_statusReturn descriptionAction0 No1 Succeed2 Device System Error3 Errors in Network Communication4 Errors in Chat with UPnP Device5 Rejected by UPnP Device, Maybe Port Conflictdecoder_control.cgicontroldescription DecoderPermission operatorSyntax /decoder_control.cgi?command=[&next_url=]Parameters value description0 upup1 Stop2 downdown3 Stop4 leftleft5 Stop6 right7 Stop right… Reserved25 center26 Vertical patrol27 Stop vertical patrol 28 Horizon patrol 29Stop horizon patrol … Reserved94IO output high 95IO output low camera_control.cgidescription To control camera sensor ParametersPermission operatorSyntax /camera_control.cgi?param=&value=[&next_url=]Parameters param value (see below)param value0 Resolution8: QVGA 32:VGA 1 Brightness0~255 2 Contrast0~6 3 mode 0: 50Hz1: 60Hz2: Outdoor5 Flip&mirror0: default1: flip2: mirror3: flip + mirrorreboot.cgidescription Reboot devicePermission AdministratorSyntax /reboot.cgi[?next_url=]restore_factory.cgidescription Restore factory settingsPermission AdministratorSyntax /restore_factory.cgi[?next_url=]get_params.cgidescription To obtain the device settings info.Permission AdministratorSyntax /get_params.cgiReturn:id DeviceIDsys_ver Firmware version numberapp_ver Web UI version numberalias aliasnow The count of seconds form 1970-1-1 0:0:0 tonowtz The current time zone settings contrast withthe standard time zone GMT (Unit: Seconds)Calibration time 1:enablentpntp_enable 0:disableServerntp_svr Ntpnameuser1_name User1passworduser1_pwd User1user1_pri User1permission… …nameuser8_name User8user8_pwd User8passwordpermissionuser8_pri User8dev2_alias The 2nd Device aliasdev2_host The 2nd Device host(IP or Domain name)dev2_port The 2nd Device portdev2_user The 2nd Device user namedev2_pwd The 2nd Device password… …dev9_alias The 9th Device aliasdev9_host The 9th Device host(IP or Domain name) dev9_port The 9th Device portdev9_user The 9th Device user namedev9_pwd The 9th Device passwordaddressip IPmask maskgateway gatewayserverdns Dnsport portwifi_enable 0:disable1:enableSSIDwifi_ssid WIFIwifi_encrypt 0:disable 1:enablewifi_defkey Wep Default TX Keywifi_key1 Key1wifi_key2 Key2wifi_key3 Key3wifi_key4 Key4wifi_authtype Authetication type 0:open 1:sharewifi_keyformat Keyformat 0:Hex 1:ASCIIwifi_key1_bits 0:64 bits; 1:128 bitswifi_key2_bits 0:64 bits; 1:128 bitswifi_key3_bits 0:64 bits; 1:128 bitswifi_key4_bits 0:64 bits; 1:128 bitswifi_channel Channel (default 6)wifi_mode Mode (default 0)wifi_wpa_psk wpa_psk1:enablepppoe_enable 0:disablepppoe_user pppoeuserpasswordpppoe_pwd pppoe1:enableupnp_enable 0:disableddns_service 0:disable DDNS1:2:(dyndns)3:(statdns)4:(custom)5: Reserved6: Reserved7: Reserved8:(dyndns)9:(statdns)userddns_user Ddnsddns_pwd Ddnspasswordhostddns_host Ddnsddns_proxy_svr Proxy server (only used in china )portddns_proxy_port Proxyservermail_svr Mailboxmail_port Mailbox server portmail_user Mail user namepasswordmail_pwd Mailmail_sender Themailboxsendermail_receiver1 The receiver1 mailboxmail_receiver2 The receiver2 mailboxmail_receiver3 The receiver3 mailboxmail_receiver4 The receiver4 mailboxmail_inet_ip Mail send internet IP 0:disable 1:enableserverftp_svr FTPserverportftp_port FTPnameftp_user Userftp_pwd passwordftp_dir catalogue1:pasvftp_mode 0:postinterval (Seconds) 0:disableftp_upload_interval Uploadalarm_motion_armed 0:motion disable 1:enablealarm_motion_sensitivity Sensitivity 0:high 1:medium 2:low 3:ultra low alarm_input_armed 0:input detect disable 1:enabledisable IO linkage 1:enable alarm_iolinkage 0:whenalarmalarm_mail 0:when alarm disable mail send 1:enableinterval (Seconds) 0:disablealarm_upload_interval Uploadupgrade_firmware.cgifirmwaredescription UpgradePermission AdministratorSyntax /upgrade_firmware.cgi[?next_url=]Note Must use POST method.upgrade_htmls.cgidescription Upgrade Web UI firmwarePermission AdministratorSyntax /upgrade_htmls.cgi[?next_url=]Note Must use POST method.set_alias.cgidescription Set device aliasPermission AdministratorSyntax /set_alias.cgi?alias=[&next_url=]<=20Parameters Alias:lengthset_datetime.cgidescription Set device data timePermission AdministratorSyntax /set_datetime.cgi?tz=&ntp_enable=&ntp_svr=[&now=&next_url=] Parameters now: The count of seconds form 1970-1-1 0:0:0 to now;if use, the device will calibration time depend on it.tz:set time zone. The current time zone settings contrast with thestandard time zone GMT (Unit: Seconds)ntp_enable:0:disable 1:enablentp_svr:ntp server length <= 64set_users.cgidescription Set device user settingsPermission AdministratorSyntax /set_users.cgi?user1=&pwd1=&pri1=&user2=&pwd2=&pri2=&user3=&pwd 3=&pri3=&user4=&pwd4=&pri4=&user5=&pwd5=&pri5=&user6=&pwd6=&pri6=&user7=&pwd7=&pri7=&user8=&pwd8=&pri8=[&next_url=]user1 name length <= 12Parameters user1:pwd1: user1 password length <= 12pri1: user1 Permission 0:visitor 1:operator 2: administrator…user8: user1 name length <= 12pwd8: user1 password length <= 12pri8: user1 Permission 0:visitor 1:operator 2: administratorset_devices.cgidescription Set muilt devicePermission AdministratorSyntax /set_devices.cgi?dev2_alias=&dev2_host=&dev2_port=&dev2_user=&dev 2_pwd=&dev3_alias=&dev3_host=&dev3_port=&dev3_user=&dev3_pwd=&dev4_alias=&dev4_host=&dev4_port=&dev4_user=&dev4_pwd=&dev5_alias=&dev5_host=&dev5_port=&dev5_user=&dev5_pwd=&dev6_alias=&dev6_host=&dev6_port=&dev6_user=&dev6_pwd=&dev7_alias=&dev7_host=&dev7_port=&dev7_user=&dev7_pwd=&dev8_alias=&dev8_host=&dev8_port=&dev8_user=&dev8_pwd=&dev9_alias=&dev9_host=&dev9_port=&dev9_user=&dev9_pwd=[&next_url=]Parameters dev2_alias:The 2nd Device aliasdev2_host:The 2nd Device host(IP or Domain name)dev2_port:The 2nd Device portdev2_user:The 2nd Device user namedev2_pwd:The 2nd Device password… …dev9_alias:The 9th Device aliasdev9_host:The 9th Device host(IP or Domain name)dev9_port:The 9th Device portdev9_user:The 9th Device user namedev9_pwd:The 9th Device passwordset_network.cgidescription Set device basic net settingsPermission AdministratorSyntax /set_network.cgi?ip=&mask=&gateway=&dns=&port=[&next_url=] Parameters Ip:ip address; if ip set null,The device will DHCP Ipmask: maskgateway: gatewaydns: dns serverport: port numberset_wifi.cgidescription Set device wireless settings (wifi)Permission AdministratorSyntax /set_wifi.cgi?enable=&ssid=&encrypt=&defkey=&key1=&key2=&key3=& key4=&authtype=&keyformat=&key1_bits=&key2_bits=&key3_bits=&key4_bits=&channel=&mode=&wpa_psk=[&next_url=]0:disable 1:enableParameters enable:ssid: wifi SSIDencrypt: 0:disable encrypt 1:enabledefkey: Wep Default TX Keykey1:wep key1…key4:wep key4authtype:Authetication type 0:open 1:sharekeyformat:Keyformat 0:Hex 1:ASCIIkey1_bits: 0:64 bits; 1:128 bits…key4_bits: 0:64 bits; 1:128 bitschannel:Channel (default 6)mode:Mode (default 0)wpa_psk:wpa_psk length <= 64;if not use,set null.set_pppoe.cgidescription Set device pppoe settingsPermission Administrator[&next_url=] Syntax /set_pppoe.cgi?enable=&user=&pwd=0:disable pppoe; 1:enableParameters enable:user: user name length <=40pwd: password length <=20set_upnp.cgisettingsdescription SetUPNPPermission AdministratorSyntax /set_upnp.cgi?enable=[&next_url=]Parameters enable:0:disable UPNP; 1:enableset_ddns.cgidescription Set device DDNS settingsPermission AdministratorSyntax /set_ddns.cgi?service=&user=&pwd=&host=&proxy_svr=&proxy_port= [&next_url=]:Parameters service0:disable DDNS;1:;2: (dyndns);3: (statdns);4: (custom)5: Reserved6: Reserved7: Reserved8:(dyndns)9:(statdns)user: user name length <=20pwd: password length <=20host:DDNS domain name length <=40proxy_svr: Proxy server length <=20 (only used in china Mainland orHongKong )proxy_port : Proxy portset_ftp.cgidescription Set device FTP settingsPermission AdministratorSyntax /set_ftp.cgi?svr=&port=&user=&pwd=&mode=&dir=&upload_interval=[ &next_url=]Parameters svr: FTP server length <=64port: FTP server portuser: User namepwd:passworddir: FTP upload cataloguemode: 0:post 1:pasvupload_interval:Upload interval (Seconds) 0:disable (range:0-65535)set_mail.cgidescription Set device mail settingsPermission AdministratorSyntax /set_mail.cgi?svr=&port=&user=&pwd=&sender=&receiver1=&receiver 2=&receiver3=&receiver4=&mail_inet_ip=[&next_url=]Parameters svr: mail server length <=64port: Mailbox server portuser: User name length <=20pwd: password length <=20sender: The sender mailbox length <=40receiver1: The receiver1 mailbox length <=40receiver2: The receiver2 mailbox length <=40receiver3: The receiver3 mailbox length <=40receiver4: The receiver4 mailbox length <=40mail_inet_ip: 0:disable 1:enableset_alarm.cgidescription Set device alarm settingsPermission AdministratorSyntax /set_alarm.cgi?motion_armed=&motion_sensitivity=&input_armed=&io linkage=&mail=&upload_interval=[&next_url=]0:motion disable 1:enableParameters motion_armed:motion_sensitivity: Sensitivity 0:high 1:medium 2:low 3:ultra lowinput_armed: 0:input detect disable 1:enableiolinkage: 0:when alarm disable IO linkage 1:enablemail: 0:when alarm disable mail send 1:enableupload_interval:Upload interval (Seconds) 0:disable (range:0-65535)。

vivado中sdk的开发流程

vivado中sdk的开发流程

vivado中sdk的开发流程Vivado中的SDK是一款强大的集成开发环境,用于在Xilinx的FPGA设备上开发嵌入式软件。

它提供了一系列工具和功能,以简化开发流程,并提供与硬件的无缝集成。

本文将详细介绍使用Vivado中的SDK进行开发的步骤。

一、项目设置与创建要开始在Vivado中进行SDK开发,首先需要在Vivado中创建一个新的项目。

在Vivado的主界面上,选择"File"->"New Project",然后按照向导的指引设置项目的名称、位置和硬件平台。

创建项目时,需要选择适当的硬件平台文件(.hdf),该文件包含了与FPGA硬件相关的信息。

选择完硬件平台文件后,Vivado会自动创建一个包含硬件定义的新项目。

二、硬件设计在Vivado中创建项目后,接下来需要进行硬件设计。

这可以通过使用Vivado 的可视化设计工具或者使用硬件描述语言(HDL)进行手动设计来完成。

如果选择使用可视化设计工具,可以通过使用Vivado提供的Block Design功能来构建硬件系统。

这个功能提供了一个图形界面,使得用户可以方便地将不同的模块组合起来,并设置它们的连接。

如果选择使用HDL进行硬件设计,可以使用Vivado的IP Integrator功能来创建一个新的HDL设计。

该功能可以支持常见的硬件描述语言,如Verilog和VHDL。

无论使用哪种方式进行硬件设计,当设计完成后,需要生成Bitstream文件。

这个文件包含了对FPGA中逻辑门的配置信息,可以通过Vivado的"Generate Bitstream"选项进行生成。

三、软件设计当硬件设计完成后,接下来需要进行嵌入式软件开发。

在Vivado中,可以使用SDK环境来进行软件开发。

首先,需要在Vivado中导出硬件定义文件(.hdf)。

这可以通过选择"File"->"Export"->"Export Hardware"来完成。

虹软人脸识别sdk使用-android(一)

虹软人脸识别sdk使用-android(一)

虹软⼈脸识别sdk使⽤-android(⼀)在这篇⽂章中已经介绍了如何使⽤camera+surfaceview在此基础上我们介绍如何接⼊虹软的⼈脸识别功能。

⾸先⾃⼰去注册虹软的开发者账号,并⾃⾏下载SDK,SDK的APP_ID和SDK_KEY是唯⼀的,可以激活⼀台设备,完成认证后,可以⽤于激活100台设备。

⼀、SDK接⼊配置1、在官⽅⽂档中可以看到主要将⼏个jar包和⼏个so⽂件接⼊到你的项⽬⽬录下。

完成这步就算完成了接⼊SDK。

2、激活引擎我们在⾃定义的camera的项⽬中,将激活与初始化封装起来,重新写init()函数private void init() {/** 激活* */String APP_ID = "换成⾃⼰的ID";String SDK_KEY = "换成⾃⼰的key";int code = FaceEngine.activeOnline(MainActivity_l.this, APP_ID, SDK_KEY);if (code == ErrorInfo.MOK) {Log.i(TAG, "activeOnline success");Toast.makeText(MainActivity_l.this, "激活成功", Toast.LENGTH_SHORT).show();} else if (code == ErrorInfo.MERR_ASF_ALREADY_ACTIVATED) {Log.i(TAG, "already activated");Toast.makeText(MainActivity_l.this, "已经激活", Toast.LENGTH_SHORT).show();} else {Log.i(TAG, "activeOnline failed, code is : " + code);}/** 初始化* */faceEngine = new FaceEngine();// int code_init = faceEngine.init(getApplicationContext(),DetectMode.ASF_DETECT_MODE_VIDEO, DetectFaceOrientPriority.ASF_OP_0_ONLY, scale,maxFaceNum, initMask);int code_init = faceEngine.init(getApplicationContext(), DetectMode.ASF_DETECT_MODE_VIDEO, DetectFaceOrientPriority.ASF_OP_ALL_OUT, scale, maxFaceNum, initMask);if (code_init != ErrorInfo.MOK) {Toast.makeText(this, "init failed, code is : " + code,Toast.LENGTH_SHORT).show();} else {Log.i(TAG, "init success");Toast.makeText(MainActivity_l.this, "初始化成功", Toast.LENGTH_SHORT).show();}}View Code这样我们就完成了如何激活与初始化3、属性检测我们使⽤虹软SDK主要是使⽤他进⾏⼈脸追踪和⼈脸识别等功能,⽐如画⼈脸框,显⽰性别,年龄,⼈脸数,是否活体等功能,所以我们继续在init()添加功能/** 检测属性* */Camera camera = CameraUtils.getmCamera();camera.setDisplayOrientation(90);DisplayMetrics metrics = new DisplayMetrics();getWindowManager().getDefaultDisplay().getMetrics(metrics);final Camera.Parameters parameters = camera.getParameters();parameters.setPreviewFormat(ImageFormat.NV21);camera.setParameters(parameters);camera.setPreviewCallback(new Camera.PreviewCallback() {@Overridepublic void onPreviewFrame(byte[] nv21, Camera camera) {// 这⾥⾯的Bytes的数据就是NV21格式的数据previewSize = camera.getParameters().getPreviewSize();/** 显⽰⼈脸个数* */faceInfoList = new ArrayList<>();// long start = System.currentTimeMillis();int code = faceEngine.detectFaces(nv21, previewSize.width, previewSize.height,FaceEngine.CP_PAF_NV21, faceInfoList);if (code == ErrorInfo.MOK && faceInfoList.size() > 0) {Log.i(TAG, "detectFaces, face num is : " + faceInfoList.size());// Toast.makeText(MainActivity.this,"检测成功",Toast.LENGTH_SHORT).show();} else {Log.i(TAG, "no face detected, code is : " + code);// Toast.makeText(MainActivity.this,"检测失败",Toast.LENGTH_SHORT).show();}face_num.setText("⼈脸数:" + faceInfoList.size());/** 显⽰年龄* */processMask = FaceEngine.ASF_AGE | FaceEngine.ASF_GENDER | FaceEngine.ASF_FACE3DANGLE | FaceEngine.ASF_LIVENESS;int faceProcessCode = faceEngine.process(nv21, previewSize.width, previewSize.height,FaceEngine.CP_PAF_NV21, faceInfoList, processMask);if (faceProcessCode == ErrorInfo.MOK) {Log.i(TAG, "process success");// Toast.makeText(MainActivity.this,"属性成功",Toast.LENGTH_SHORT).show();} else {Log.i(TAG, "process failed, code is : " + faceProcessCode);// Toast.makeText(MainActivity.this,"属性失败",Toast.LENGTH_SHORT).show();}List<AgeInfo> ageInfoList = new ArrayList<>();int ageCode = faceEngine.getAge(ageInfoList);// 获取第⼀个⼈脸的年龄信息,多⼈脸情况进⾏循环即可if (ageCode == ErrorInfo.MOK && ageInfoList.size() > 0) {if (ageInfoList.size() > 0) {Log.i(TAG, "age of the first face is : " + ageInfoList.get(0).getAge());// age.setText("年龄:"+ageInfoList.get(0).getAge());} else {Log.i(TAG, "no face processed");// age.setText("年龄:--");}} else {Log.i(TAG, "get age failed, code is : " + ageCode);}if (ageInfoList.size() == 1) {age.setText("年龄:" + ageInfoList.get(0).getAge());}if (ageInfoList.size() == 2){age.setText("年龄:"+ageInfoList.get(0).getAge()+" ,"+ageInfoList.get(1).getAge());}if (ageInfoList.size() == 0) {age.setText("年龄:--");}/** 显⽰性别* */List<GenderInfo> genderInfoList = new ArrayList<>();int genderCode = faceEngine.getGender(genderInfoList);// 获取第⼀个⼈脸的性别信息,多⼈脸情况进⾏循环即可if (genderCode == ErrorInfo.MOK) {if (genderInfoList.size() > 0) {Log.i(TAG, "gender of the first face is : " +genderInfoList.get(0).getGender());} else {Log.i(TAG, "no face processed");}} else {Log.i(TAG, "get gender failed, code is : " + genderCode);}if (genderInfoList.size() > 0 && genderInfoList.get(0).getGender() == 0) {gender.setText("年龄:M");}if (genderInfoList.size() > 0 && genderInfoList.get(0).getGender() == 1) {gender.setText("年龄:F");}if (genderInfoList.size() == 2 ){gender.setText("年龄:"+gen(genderInfoList.get(0).getGender())+gen(genderInfoList.get(1).getGender()));}if (genderInfoList.size() == 0) {gender.setText("年龄:--");}/** 活体* */List<LivenessInfo> livenessInfoList = new ArrayList<>();int livenessCode = faceEngine.getLiveness(livenessInfoList);// RGB活体不⽀持多⼈脸,因此只能拿第1个活体信息if (livenessCode == ErrorInfo.MOK) {if (livenessInfoList.size() > 0) {Log.i(TAG, "liveness of the first face is : " +livenessInfoList.get(0).getLiveness());} else {Log.i(TAG, "no face processed");}} else {Log.i(TAG, "get liveness failed, code is : " + livenessCode);}if (livenessInfoList.size() > 0 && livenessInfoList.get(0).getLiveness() == 1) {liveness.setText("活体:Y");} else {liveness.setText("活体:--");}if (livenessInfoList.size() == 2 ){liveness.setText("活体:"+Live(livenessInfoList.get(0).getLiveness())+Live(livenessInfoList.get(1).getLiveness()));}View Code所以写完这些就完成了检测⼈脸数,年龄等。

身份证阅读器SDK使用说明

身份证阅读器SDK使用说明

身份证阅读器SDK使用说明(V1.3)深圳华视电子读写设备有限公司目录版本变更记录 (1)1身份证阅读器SDK简介 (1)2系统需求 (1)3函数说明 (1)3.1 核心相关函数 (1)3.2 获取身份证具体信息函数 (2)3.3 人证比对相关函数 (3)3.4 函数调用流程 (3)4身份证阅读器SDK (4)4.1 文件夹组成 (4)4.2 身份阅读器SDK的使用 (5)4.2.1 SDK使用方法 (5)4.2.2 SDK使用限制 (5)4.3 身份证阅读器SDK测试程序 (5)版本变更记录1身份证阅读器SDK简介本文档描述了深圳华视身份证阅读器SDK(Windows版)的调用方法、函数定义、参数和返回值说明,供开发商进行二次开发使用。

2系统需求(1)操作系统:Windows XP(2)开发环境:本SDK采用ANSI C语言编写,假定用户采用C/C++语言作为开发工具。

3函数说明3.1核心相关函数●●●●●3.2获取身份证具体信息函数下面是一组获取身份证具体信息的函数:3.3人证比对相关函数人证比对:3.4函数调用流程身份证阅读器SDK库应用函数的调用流程如下图所示:4身份证阅读器SDK4.1文件夹组成身份证阅读器SDK,由下述文件夹组成:·Include包含身份证阅读器SDK库头文件(termb.h);·lib包含身份证阅读器SDK库文件(静态库:termb.lib,动态库:termb.dll,CVRApi.dll,sdtapi.dll,WLTLib.dll)等;·license包含文件:license.lic, base.dat·example包含身份证阅读器SDK库测试程序;·doc包含身份证阅读器相关文档说明(身份证阅读器SDK使用说明.doc)。

4.2身份阅读器SDK的使用4.2.1SDK使用方法(1)静态库的适用方法:在VC环境下添加termb.lib附加依赖项,在调用它的应用程序里包含相应的termb.h头文件。

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Luxand, Inc.Luxand FaceSDK 3.0Face Detection and Recognition LibraryDeveloper’s GuideTable of ContentsOverview (4)Requirements (4)Technical Specifications (4)Face Detection (4)Face Matching (5)Facial Feature Detection (5)Eye Centers Detection (5)Library Size (5)Installation (5)Windows (5)Linux/Mac OS X (6)Directory Structure (6)Sample Applications (6)Using FaceSDK with Programming Languages (7)Using with .NET (C# and VB) (7)Using with C/C++ (8)Using with Delphi (8)Using with Visual Basic 6.0 (8)Redistributables (9)Using Luxand FaceSDK (9)Library Activation (10)FSDK_GetHardware_ID Function (10)FSDK_ActivateLibrary Function (11)FSDK_GetLicenseInfo Function (11)Initialization (12)FSDK_Initialize Function (12)FSDK_Finalize Function (12)Working with Images (12)FSDK_LoadImageFromFile Function (13)FSDK_SaveImageToFile Function (13)FSDK_LoadImageFromBuffer Function (14)FSDK_GetImageBufferSize Function (15)FSDK_SaveImageToBuffer Function (16)FSDK_LoadImageFromHBitmap Function (16)FSDK_SaveImageToHBitmap Function (17)FSDK_SetJpegCompressionQuality (17)FSDK_GetImageWidth Function (18)FSDK_GetImageHeight Function (18)FSDK_MirrorImage Function (19)FSDK_FreeImage Function (19)Face Detection (20)Data types (20)FSDK_DetectFace Function (21)FSDK_DetectMultipleFaces Function (22)FSDK_SetFaceDetectionParameters Function (23)FSDK_SetFaceDetectionThreshold Function (24)Facial Feature Detection (25)FSDK_DetectFacialFeatures Function (25)FSDK_DetectFacialFeaturesInRegion Function (26)FSDK_DetectEyes Function (27)FSDK_DetectEyesInRegion Function (28)Face Matching (29)FSDK_GetFaceTemplate (30)FSDK_GetFaceTemplateInRegion (30)FSDK_GetFaceTemplateUsingEyes (31)FSDK_MatchFaces (32)FSDK_GetMatchingThresholdAtFAR (33)FSDK_GetMatchingThresholdAtFRR (33)Working with Web Cameras (34)Data Types (34)FSDK_InitializeCapturing Function (35)FSDK_FinalizeCapturing Function (35)FSDK_SetCameraNaming Function (36)FSDK_GetCameraList Function (36)FSDK_GetVideoFormatList Function (37)FSDK_SetVideoFormat Function (38)FSDK_OpenVideoCamera Function (39)FSDK_GrabFrame Function (39)FSDK_CloseVideoCamera Function (40)Thread Safety (40)Migration from FaceSDK 2.0 (41)Deprecated Functions (42)Error Codes (42)Detected Facial Features (42)Library Information (45)OverviewLuxand FaceSDK is a cross-platform face detection and recognition library that can be easily integrated into the customer’s application. FaceSDK offers the API (Application Programming Interface) to detect a face and facial features and to match faces. Following face detection, the SDK provides the coordinates of 40 facial feature points for further processing. For example, the facial feature points include eyes, eye corners, eyebrows, mouth corners and nose tip. The library is webcam-capable, and able to retrieve frames from DirectShow-compatible cameras.Luxand FaceSDK is available for all 32-bit and 64-bit versions of Windows and Linux, and 64-bit MacOS X. The SDK is supplied as a dynamic link library. FaceSDK contains interface header files and sample applications for C, Microsoft Visual C++ 6.0/2005/2008, Visual Basic 6.0, Visual Basic .NET 2005/2008, Microsoft C# .NET 2005/2008, C++Builder 6.0 and Borland Delphi 6.0/7.0.RequirementsThe FaceSDK library supports the following platforms:∙Windows 2000/XP/2003/Vista/2008/Seven∙Linux (RHEL 5+, CentOS 5+ and other)∙Mac OS X 10.4+ x86_64Intel processor is recommended for better performance.Minimum system requirements:∙ 1.6 GHz processor∙256 MB RAM∙150 MB free disk spaceRecommended system requirements:∙ 2.4 GHz Intel multi-core processor∙ 2 GB RAM∙DirectShow-compatible webcamNote that web camera functions are available only for Windows 32/64 platforms. Technical SpecificationsThe FaceSDK library has the following technical specifications:Face Detection∙Robust frontal face detection∙Detection of multiple faces in a photo∙Head rotation support: –30..30 degrees of in-plane rotation and –30..30 degrees out-of-plane rotation∙Determines in-plane face rotation angle∙Detection speed: as fast as 370 frames per second*, depending on resolution o Realtime detection: 0.0027 sec (370 FPS)*, webcam resolution, –15..15 degrees of in-plane head rotationo Reliable detection: 0.7 sec, digicam resolution, –30..30 degrees of in-plane head rotation∙Returned information for each detected face: (x,y) coordinates of face center, face width and rotation angle∙Easy configuration of face detection parametersFace Matching∙Matching of two faces at given FAR (False Acceptance Rate) and FRR (False Rejection Rate)∙Enrollment time: 0.117 seconds (8.5 FPS)* (at webcam resoluton)∙Template Size: 16 kb∙Matching speed: 30,000 faces per second*∙Returned information: facial similarity levelFacial Feature Detection∙Detection of 40 facial feature points (eyes, eyebrows, mouth, nose, face contour) ∙Detection time: 0.59 seconds* (not including face detection stage)∙Allowed head rotation: –30..30 degrees of in-plane rotation, –10..10 degrees out-of-plane rotation∙Returned information: array of 40 (x,y) coordinates of each facial feature pointEye Centers Detection∙Detection of eye centers only, detection time: 0.067 seconds*(not including face detection stage)∙Returned information: two (x,y) coordinates of left eye center and right eye centerLibrary Size∙The size of the redistributables does not exceed 10MB for each platform.* Measured on Intel 2.4 Ghz ProcessorInstallationWindowsTo install Luxand FaceSDK, run the installation file:and follow the instructions.FaceSDK is installed to the C:\Program Files\Luxand\FaceSDK directory by default. FaceSDK is a copy-protected library, and must be activated with a license key before each use (see the Library Activation chapter).Linux/Mac OS XUnpack the Luxand_FaceSDK.tar.bz2 archive into the desired directory. Directory StructureThe FaceSDK directory contains the following directories and files:Sample ApplicationsFaceSDK is distributed with the following sample applications (they can be found in the samples\ directory of FaceSDK):1.LiveRecognitionThis application memorizes a person from a camera and recognizes her when she looks into a webcam. Source code is available on Microsoft C# 2005/2008, Borland Delphi 6.0/7.0, Microsoft Visual C++ 2005/2008, Microsoft Visual Basic .NET 2005/2008 and Visual Basic 6.0.2.FaceTrackingThis application receives a picture from a webcam and highlights all detected faces with rectangles. Source code is available on Microsoft C# 2005/2008, Borland Delphi6.0/7.0, Microsoft Visual C++ 2005/2008, Microsoft Visual Basic .NET 2005/2008and Visual Basic 6.0.3.LookalikesThis application allows the user to create a database of faces and run a search for best matches (the most alike face from a database is shown). Source code is available on C++, Microsoft C# 2005/2008, Borland Delphi 6.0/7.0.4.FacialFeaturesThis application opens a photograph, detects a face in a photo (only one face, the one that can be detected best), detects face features and draws a frame around the detectedface and detected features. Source code is available on Microsoft C# 2005/2008, Borland C++ Builder 6.0, Borland Delphi 6.0/7.0, Microsoft Visual C++ 2005/2008, Microsoft Visual Basic .NET 2005/2008 and Visual Basic 6.0.5.PortraitThis application is for command line. It receives a picture, detects a face and, if the face is found, crops it and saves to file. Source code is available on C++.6.AdvancedSource code of .NET wrapper which links facesdk.dll dynamically and samples of using this wrapper. Refer to Using with .NET (C# and VB) for details.Using FaceSDK with Programming LanguagesTo access the FaceSDK library functions, you need to use its binary file in your applications. The specific file depends on the platform:∙Windows applications use facesdk.dll∙Windows .NET applications use .dll∙Linux applications use libfsdk.so∙Mac OS X applications use libfsdk.dylibIt is usually recommended to store this file in the directory where the executable file of your application is located. Alternatively, you may keep the file in:∙the working directory of your application∙the directory specified in the path environment variable of your system: PATH (Windows), LD_LIBRARY_PATH (Linux), DYLD_LIBRARY_PATH (Mac OS X). You need to include interface header files into your application project in order to use FaceSDK.Using with .NET (C# and VB)For Microsoft .NET applications, you need to add the .NET component into your project. Follow these steps to add the component in Visual Studio 2005/2008:∙Select Project – Add Reference – Browse∙For 32-bit applications, choose the file bin\win32\.dll∙For 64-bit native applications, choose the file bin\win64\.dll ∙Add the following statement to the beginning of your application:After that you may use the methods of the Luxand.FSDK namespace for general FaceSDK functions, and Luxand.FSDKCam namespace for webcam-related functions. You may refer just to FSDK and FSDKCam namespaces if using Luxand is specified.Once .dll is added to the references, it will be redistributed automatically with your application, so no specific deployment actions are required. You do not need to redistribute facesdk.dll with your application.By default, the documentation refers to C/C++ declarations of FaceSDK functions. For example, the function to detect a face is referred to as FSDK_DetectFace function. To refer to this function in .NET, replace the FSDK_ prefix with FSDK. namespace. Thus, the reference to this function becomes FSDK.DetectFace(note that webcam-specific functions are located in the FSDKCam. namespace; refer to Working with Web Cameras for details).Note: this .NET component is available in a binary form, compatible with .NET 2.0, 3.0 and 3.5. If you need a component for a specific .NET version, you may use the source code available in the samples\advanced\.NET wrapper directory. Note that this component is actually a wrapper for facesdk.dll which is linked dynamically and must be redistributed with the application that uses this wrapper.Using with C/C++For Microsoft Visual C++ applications, you need to include the header file include\C\LuxandFaceSDK.h, and the stub library file facesdk.lib into your project.Follow these steps to add the library to your project:∙Copy include\C\LuxandFaceSDK.h into the directory of your project∙For 32-bit applications, copy bin\win32\facesdk.dll andbin\win32\facesdk.lib into the output directory of your project ∙For 64-bit applications, copy bin\win64\facesdk.dll andbin\win64\facesdk.lib into the output directory of your project ∙Choose Project Properties – Linker – Input – Additional Dependencies, and add facesdk.lib string∙Choose Project Properties – Linker – General – Additional Library Directories Dependencies, and add $(OutDir) string (a reference to the output directory) ∙Add the following statement to the beginning of your application:The output directory $(OutDir) typically refers to Debug\ or Release\ in the directory of your solution. You may change it in the Configuration Properties – General of your project. You may also choose another directory to store the .lib file, but it is recommended to keep facesdk.dll in the directory where the executable file of your application is located.You need to redistribute the file facesdk.dll with your application.Using with DelphiFor Delphi applications, put facesdk.dll into the working directory and use the include\Delphi\LuxandFaceSDK.pas unit in your project.You need to redistribute the file facesdk.dll with your application.Using with Visual Basic 6.0For Visual Basic 6.0 applications, put the Visual Basic wrapper (bin\win32\FaceSDK-VB.dll)into the project directory and add LuxandFaceSDK.bas (include\VB6\LuxandFaceSDK.bas) module to your project (Select Project –Addmodule – Existing and choose a module location). Also you need to put facesdk.dll into the application working directory.You need to redistribute both FaceSDK-VB.dll and facesdk.dll with your application.RedistributablesThe following files may be redistributed with your application:Using Luxand FaceSDKThe usage level of the library depends on the functionality required from Luxand FaceSDK. The typical scenario is:1.Activate FaceSDK by calling up the FSDK_ActivateLibrary function with the keysent by Luxand, Inc.2.Initialize FaceSDK by calling up the FSDK_Initialize function.3.Load images either from file, buffer, or the HBITMAP handle(FSDK_LoadImageFromFile, FSDK_LoadImageFromBuffer,FSDK_LoadFromHBitmap functions)4.Set face detection parameters if needed (FSDK_SetFaceDetectionParameters,FSDK_SetFaceDetectionThreshold)e FaceSDK functions:∙Detect a face (FSDK_DetectFace) or multiple faces (FSDK_DetectMultipleFaces) in an image∙Detect facial features if needed (FSDK_DetectFacialFeatures, FSDK_DetectFacialFeaturesInRegion)∙Extract a face template from the image (FSDK_GetFaceTemplate, FSDK_GetFaceTemplateInRegion,FSDK_GetFaceTemplateUsingFeatures)∙Match face templates (FSDK_MatchFaces) and acquire facial similarity level∙To find out if a face belongs to the same person, calculate the matching threshold at a given FAR or FRR rate(FSDK_GetMatchingThresholdAtFAR andFSDK_GetMatchingThresholdAtFRR functions).6.Finalize the FaceSDK library (FSDK_Finalize function).To work with a camera, follow these steps:1.Initialize camera capturing (FSDK_InitializeCapturing)2.Get list of cameras available in the system (FSDK_GetCameraList)3.Get list of video formats supported by the camera (FSDK_GetVideoFormatList)4.Set the desired video format for the chosen camera (FSDK_SetVideoFormat)5.Open video camera (FSDK_OpenVideoCamera)6.Grab frames (FSDK_GrabFrame) in a loop, displaying them and detecting/recognizingfaces7.Close video camera (FSDK_CloseVideoCamera).8.Finalize capturing (FSDK_FinalizeCapturing).Library ActivationFaceSDK is a copy-protected library, and must be activated with a license key before its use. You need to pass the license key received from Luxand, Inc. to the FSDK_ActivateLibrary function before initializing Luxand FaceSDK. Almost all FaceSDK functions will return the FSDKE_NOT_ACTIVATED error code in case the library is not activated. To retrieve your license information, call FSDK_GetLicenseInfo. This function returns the name the library is licensed to. You may need to use the FSDK_GetHardware_ID function to obtain your hardware ID if your license is restricted to one machine only. Additionally, you can find out hardware ID by running the hardwareid program (ShowHardwareID.exe for Windows), which is located in the bin directory.To get a temporary evaluation key from Luxand, Inc., run License Key Wizard from the Start – Luxand – FaceSDK menu.You may also request this key at/facesdk/requestkey/.FSDK_GetHardware_ID FunctionGenerates a Hardware ID code.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:HardwareID– address of the null-terminated string for receiving the Hardware ID code. Return Value:Returns FSDKE_OK if successful.FSDK_ActivateLibrary FunctionActivates the FaceSDK library.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:LicenseKey– License key you received from Luxand, Inc.Return Value:Returns FSDKE_OK if the registration key is valid and not expired.FSDK_GetLicenseInfo FunctionRetrieves license information.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:LicenseInfo –address of the null-terminated string for receiving the license information. This variable should be allocated no less than 256 bytes of memory.Return Value:Returns FSDKE_OK if successful.InitializationFSDK_Initialize FunctionInitializes the FaceSDK library. Should be called before using of any face detection functions. C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:DataFilesPath –pointer to the null-terminated string specifying the path where facesdk.dll is stored. An empty string means the current directory. (Note: the parameter is not used since version 1.8; an empty string might be passed as this parameter.)Return Value:Returns FSDKE_OK if successful or FSDK_IO_ERROR if an I/O error occurs.FSDK_Finalize FunctionFinalizes the FaceSDK library. Should be called when the application is exited.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Return Value:Returns FSDKE_OK if successful.Working with ImagesImages are represented as the HImage data type.C++ Declaration:C# Declaration:Delphi Declaration:FaceSDK provides a number of functions to load images to the internal representation from files, buffers or HBITMAP handles and to save images from the internal representation to files, buffers and HBITMAP handles. Each FSDK_LoadImageFromXXXX function creates a new HImage handle, which can be deleted using the FSDK_FreeImage function.FSDK_LoadImageFromFile FunctionLoads the image from a file and provides the internal handle of this image.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:Image– pointer to HImage for receiving the loaded image handle.FileName– filename of the image to be loaded. FaceSDK supports the JPG, PNG and BMP file formats.Return Value:Returns FSDKE_OK if successful.FSDK_SaveImageToFile FunctionSaves an image to a file. When saving to .jpg files, you can set the quality of JPEG compression using the FSDK_SetJpegCompressionQuality function.C++ Syntax:C# Syntax:VB Syntax:Parameters:Image– internal handle of an image to be saved.FileName– name of file the image will be saved to. FaceSDK saves images in the BMP, PNG or JPG file format. The format to use is recognized by the extension specified in the FileName parameter.Return Value:Returns FSDKE_OK if successful.ExampleFSDK_LoadImageFromBuffer FunctionLoads an image from a buffer and provides the internal handle of this image. The function suggests that the image data is organized in a top-to-bottom order, and the distance between adjacent rows is ScanLine bytes (for example, in the 24-bit image, the ScanLine value might be 3*Width bytes if there is no spacing between adjacent rows). The following image modes are supported:The function is not available in .NET. It is suggested to use FSDK_LoadImageFromHBitmap function instead.C++ Syntax:VB Syntax:Parameters:Image– pointer to HImage for receiving the loaded image handle.Buffer – pointer to buffer containing image data.Width – width of an image in pixels.Height – height of an image in pixels.ScanLine – distance between adjacent rows in bytes.ImageMode – mode of an image.Return Value:Returns FSDKE_OK if successful.FSDK_GetImageBufferSize FunctionReturns the size of the buffer required to store an image.C++ Syntax:Delphi Syntax:VB Syntax:The function is not available in .NET.Parameters:Image– internal handle of an image.BufSize– pointer to an integer variable to store the calculated buffer size. ImageMode – desired image mode of a buffer.Return Value:Returns FSDKE_OK if successful.FSDK_SaveImageToBuffer FunctionSaves an image to a buffer in the desired image mode. Refer to the FSDK_LoadImageFromBuffer function description to read more about image modes.C++ Syntax:Delphi Syntax:VB Syntax:The function is not available in .NET. It is suggested to use the FSDK_SaveImageToHBitmap function instead.Parameters:Image– internal handle of an image to be saved.Buffer – pointer to the buffer containing the image data.ImageMode – desired mode an image will be saved in.Return Value:Returns FSDKE_OK if successful.FSDK_LoadImageFromHBitmap FunctionLoads the image from an HBITMAP handle and provides the internal handle of this image.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:Image– pointer to HImage for receiving the loaded image handle.BitmapHandle– handle of the image to be loaded.FSDK_SaveImageToHBitmap FunctionCreates an HBITMAP handle containing the image.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:Image – internal handle of the image to be saved to HBITMAP.BitmapHandle – pointer to HBITMAP the created HBITMAP handle will be saved to. Return Value:Returns FSDKE_OK if successful.FSDK_SetJpegCompressionQualitySets the quality of the JPEG compression to use in the FSDK_SaveImageToFile function. C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:Quality – quality of JPEG compression. Varies from 0 to 100.FSDK_GetImageWidth FunctionReturns the width of an image.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:SourceImage– internal handle of an image.Width– pointer to an integer variable to store the width of an image. Return Value:Returns FSDKE_OK if successful.FSDK_GetImageHeight FunctionReturns the height of an image.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:SourceImage– internal handle of an image.Height– pointer to an integer variable to store the height of an image.FSDK_MirrorImage FunctionMirrors an image. The function can mirror horizontally and vertically.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:Image – handle of the image to be mirrored. UseVerticalMirroringInsteadOfHorizontal – sets the mirror direction. TRUE: left-to-right swap;FALSE: top-to-bottom swap;Return Value:Returns FSDKE_OK if successful.FSDK_FreeImage FunctionFrees the internal representation of an image.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:Image – handle of the image to be freed.Return Value:Returns FSDKE_OK if successful.Face DetectionYou can use the FSDK_DetectFace function to detect a frontal face in an image. The function returns the position of the face in the image. The performance and reliability of face detection is controlled by the FSDK_SetFaceDetectionParameters and FSDK_SetFaceDetectionThreshold functions.Typical parameters for face detection are:∙To detect faces from a webcam in real time, call:∙To reliably detect faces in digital camera photos, callData typesLuxand FaceSDK introduces the TFacePosition data type that stores the information about the position of the face. The xc and yc fields specifies the X and Y coordinates of the center of the face, w specifies the width of the face, and angle specifies the in-plane rotation angle of the face in degrees.C++ Declaration:typedef struct {int xc, yc, w;double angle;} TFacePosition;C# Declaration:public struct TFacePosition {public int xc, yc, w;public double angle;}Delphi Declaration:TFacePosition = recordxc, yc, w: integer;angle: double;end;PFacePosition = ^TFacePosition;VB Declaration:Type TFacePositionxc As Longyc As Longw As Longangle As DoubleEnd TypeFSDK_DetectFace FunctionDetects a frontal face in an image and stores information about the face position into the TFacePosition structure.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:Image – handle of the image to detect the face in.FacePosition – pointer to the TFacePosition structure to store information about the face position.Return Value:Returns FSDKE_OK if successful. If a face is not found, the function returns the FSDKE_FACE_NOT_FOUND code. If the input image is too small (less than 20x20 pixels), the functions returns FSDKE_IMAGE_TOO_SMALL.ExampleFSDK_DetectMultipleFaces FunctionDetects multiple faces in an image.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:Image – handle of the image to detect faces in.DetectedCount – count of the faces found in the image.FaceArray – pointer to the array of TFacePosition structure to store the information about the detected faces.MaxSize –size of the FaceArray buffer in bytes. The function will not store more than MaxSize bytes in the buffer.Return Value:Returns FSDKE_OK if successful. If no faces are found, the function returns the FSDKE_FACE_NOT_FOUND code. If the input image is too small (less than 20x20 pixels), the functions returns FSDKE_IMAGE_TOO_SMALL.ExampleFSDK_SetFaceDetectionParameters FunctionAllows setting a number of face detection parameters to control the performance and reliability of face detector.The function allows configuring the following parameters: HandleArbitraryRotations, DetermineFaceRotationAngle and InternalResizeWidth.HandleArbitraryRotations, DetermineFaceRotationAngle can be TRUE or FALSE, while InternalResizeWidth is an integer.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:HandleArbitraryRotations –extends default in-plane face rotation angle from -15..15 degrees to -30..30 degrees.TRUE: extended in-plane rotation support is enabled at the cost of detection speed (3 times performance hit).FALSE: default fast detection -15..15 degrees.DetermineFaceRotationAngle –enables or disables the detection of in-plane face rotation angle.TRUE: detects in-plane rotation angle when detecting faces. The angle is recorded into the Angle field of the TFacePosition structure (TFacePosition is a structure returned by FSDK_DetectFace and FSDK_DetectMultipleFaces).FALSE: disables the detection of rotation angle.Note: Enabling face rotation angle detection slows down the detection process slightly. Set this parameter to TRUE if you are planning to call FSDK_DetectFacialFeatures or FSDK_DetectFacialFeaturesInRegion.InternalResizeWidth – controls the detection speed by setting the size of the image the detection functions will work with. Choose higher value to increase detection quality, or lower value to improve the performance.Note: By default, all images are internally resized to the width of 384 pixels. 384 pixels are a reasonable compromise between performance and detection quality. While large images are down-sized, the smaller ones are up-sized to the specified Resize Width in order to maintain constant detection speed.Choosing the right value for InternalResizeWidthChoosing the correct value for the InternalResizeWidth parameter is essential for the correct operation of face detection functions of the SDK. The face detection functions can only detect faces as small as 20x20 pixels. Even if the source image is a large 1000x1000 dots one, the face on that image can be as small as 100x100 pixels. If you set InternalResizeWidth to 200, then the source image will be resized to 200x200 pixels, thus the face will only occupy 20x20 pixels. This is still enough for the SDK functions to work. If, however, you set InternalResizeWidth to 100, then the original image will become 100x100 pixels, and the face on it will only occupy 10x10 dots, which is NOT enough for the SDK functions to work with. Be extra careful when changing the default value of InternalResizeWidth. For example, webcam images can be usually detected with InternalResizeWidth set to 100, while images from multi-megapixel digital cameras require values of at least 384 or 512 pixels to work with.Return Value:Returns FSDKE_OK if successful.FSDK_SetFaceDetectionThreshold FunctionSets a threshold value for face detection. The default value is 5.The function allows adjusting the sensitivity of the detection. If the threshold value is set to a higher value, the detector will only recognize faces with sharp, clearly defined details, thus reducing the number of false positive detections. Setting the threshold lower allows detecting more faces with less clearly defined features at the expense of increased number of false positives.C++ Syntax:Delphi Syntax:C# Syntax:VB Syntax:Parameters:Threshold – Threshold value.。

相关文档
最新文档