smartkids77 / arcsoft_freesdk_demo Goto Github PK
View Code? Open in Web Editor NEWDemo For ArcSoft FreeSDK
Demo For ArcSoft FreeSDK
并发使用java demo进行人脸比对时出错 是类型导致的原因吗
2018-02-27 14:25:48.772 ERROR 3604 --- [nio-443-exec-15] o.a.c.c.C.[.[.[/].[disp
atcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context
with path [] threw exception [Handler dispatch failed; nested exception is java
.lang.Error: Invalid memory access] with root cause
java.lang.Error: Invalid memory access
at com.sun.jna.Native.invokeInt(Native Method) ~[jna-4.4.0.jar!/:4.4.0 (
b0)]
at com.sun.jna.Function.invoke(Function.java:419) ~[jna-4.4.0.jar!/:4.4.
0 (b0)]
at com.sun.jna.Function.invoke(Function.java:354) ~[jna-4.4.0.jar!/:4.4.
0 (b0)]
at com.sun.jna.Library$Handler.invoke(Library.java:244) ~[jna-4.4.0.jar!
/:4.4.0 (b0)]
at com.sun.proxy.$Proxy110.AFD_FSDK_StillImageFaceDetection(Unknown Sour
ce) ~[na:na]
at arcsoft.compare.FaceRecognition.doFaceDetection(FaceRecognition.java:
78) ~[classes!/:0.0.1-SNAPSHOT]
at arcsoft.compare.FaceRecognition.compareFaceSimilarity(FaceRecognition
.java:138) ~[classes!/:0.0.1-SNAPSHOT]
at com.cloume.smartedu.controller.RestApisController.validateByImage(Res
tApisController.kt:305) ~[classes!/:0.0.1-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.
0_151]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62) ~[na:1.8.0_151]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43) ~[na:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvok
e(InvocableHandlerMethod.java:205) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELE
ASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeF
orRequest(InvocableHandlerMethod.java:133) ~[spring-web-4.3.12.RELEASE.jar!/:4.3
.12.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocabl
eHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) ~[spring-w
ebmvc-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingH
andlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[sprin
g-webmvc-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingH
andlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-web
mvc-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapt
er.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.12.RELEASE.j
ar!/:4.3.12.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch
erServlet.java:967) ~[spring-webmvc-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche
rServlet.java:901) ~[spring-webmvc-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame
workServlet.java:970) ~[spring-webmvc-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServ
let.java:872) ~[spring-webmvc-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) ~[tomcat
-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkSer
vlet.java:846) ~[spring-webmvc-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat
-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:231) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52
) ~[tomcat-embed-websocket-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.do
FilterInternal(ApplicationContextHeaderFilter.java:55) ~[spring-boot-1.5.8.RELEA
SE.jar!/:1.5.8.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilter
Internal(WebRequestTraceFilter.java:110) ~[spring-boot-actuator-1.5.8.RELEASE.ja
r!/:1.5.8.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:317) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInter
ceptor.invoke(FilterSecurityInterceptor.java:127) ~[spring-security-web-4.2.3.RE
LEASE.jar!/:4.2.3.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInter
ceptor.doFilter(FilterSecurityInterceptor.java:91) ~[spring-security-web-4.2.3.R
ELEASE.jar!/:4.2.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.do
Filter(ExceptionTranslationFilter.java:114) ~[spring-security-web-4.2.3.RELEASE.
jar!/:4.2.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.session.SessionManagementFilter.doFi
lter(SessionManagementFilter.java:137) ~[spring-security-web-4.2.3.RELEASE.jar!/
:4.2.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticati
onFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-
4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.servletapi.SecurityContextHolderAwar
eRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) ~[spri
ng-security-web-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter
.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-4.2.3.RELEASE.j
ar!/:4.2.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.authentication.www.BasicAuthenticati
onFilter.doFilterInternal(BasicAuthenticationFilter.java:158) ~[spring-security-
web-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.authentication.logout.LogoutFilter.d
oFilter(LogoutFilter.java:116) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.2.3.R
ELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.header.HeaderWriterFilter.doFilterIn
ternal(HeaderWriterFilter.java:64) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.2
.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFi
lter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-4
.2.3.RELEASE.jar!/:4.2.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.context.request.async.WebAsyncManage
rIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[
spring-security-web-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.
2.3.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(Fi
lterChainProxy.java:214) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.2.3.RELEASE
]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
nProxy.java:177) ~[spring-security-web-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
elegatingFilterProxy.java:347) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
ingFilterProxy.java:263) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(
RequestContextFilter.java:99) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInter
nal(HttpPutFormContentFilter.java:108) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.
RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInterna
l(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEA
SE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterIntern
al(CharacterEncodingFilter.java:197) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RE
LEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilter
Internal(MetricsFilter.java:106) ~[spring-boot-actuator-1.5.8.RELEASE.jar!/:1.5.
8.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107) ~[spring-web-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:199) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:96) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:478) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:140) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:81) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:87) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:342) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java
:803) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLig
ht.java:66) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(Abstract
Protocol.java:868) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpo
int.java:1459) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBas
e.java:49) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1149) [na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:624) [na:1.8.0_151]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskTh
read.java:61) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
最近要在nodejs项目中增加人脸检索的功能,于是找到了这里来。配置好后node main.js报错。
经排查,是memcpy导致的:
base.memcpy(ref.address(rect.ref()), faceRes.rcFace + base.MRECT.size * i, base.MRECT.size); base.memcpy(ref.address(orientBuffer), faceRes.lfaceOrient + base.MInt32.size * i, base.MInt32.size);
尝试将memcpy的参数定义为longlong, 结果上面2条语句执行时就中断了,无输出。
麻烦帮忙解决一下,谢谢
64位的sdk, win10系统,nodejs 8.1
系统环境:win10
报错信息:
mincore\com\oleaut32\dispatch\ups.cpp(2128)\OLEAUT32.dll!00007FF888C516A1: (caller: 00007FF888C444B9) ReturnHr(1) tid(57e8) 8002801D 库没有注册。
[NSE]KVirtualFolder::Initialize(2785),AssociationItemIcon(C:)
onecoreuap\shell\lib\idllib.cpp(161)\explorerframe.dll!00007FF86659B032: (caller: 00007FF86659B35B) ReturnHr(1) tid(57e8) 80004001 尚未实现
CallContext:[\BreadcrumbBarNavigate]
shell\comdlg32\fileopensave.cpp(14267)\comdlg32.dll!00007FF88A662EFB: (caller: 00007FF88A696BC1) ReturnHr(1) tid(57e8) 80004005 未指定的错误
CallContext:[\PickerModalLoop]
assert here ..\FRDoorDemo\camerasource.cpp - 206 - CameraSource::Open
D:\QT5.9\Tools\mingw530_32\i686-w64-mingw32\include\mfreadwrite.h:831: error: 'IMFMediaSink' was not declared in this scope
HRESULT WINAPI MFCreateSinkWriterFromMediaSink(IMFMediaSink *pMediaSink,IMFAttributes *pAttributes,IMFSinkWriter **ppSinkWriter);
^
那么一堆未定义,readme写的根本不清晰,我们这些菜鸟根本摸不清楚
感谢大佬的无私奉献,解决了我一个大问题。
非托管dll调用,在此DEMO代码里完美的实现,虽然看不懂原理。
向大佬致敬!
node: v10.0.0
arcface: v2.2
api: ASFDetectFaces
我看文档中给的imgData
为MUInt8*
我理解的是ref.refType(ref.types.uint8)
,我的代码如下:
let MInt32: Type = ref.types.int32;
let MUInt32: Type = ref.types.uint32;
let MLong: Type = ref.types.long;
let MPChar: Type = ref.types.CString;
let MUInt8: Type = ref.types.uint8;
let MHandleType: Type = ref.refType(ref.types.void);
let MHandleRefType: Type = ref.refType(MHandleType);
let MUInt8RefType: Type = ref.refType(ref.types.uint8);
// 多人脸信息
let LPASF_MultiFaceInfo: StructType = StructType({
faceRect: ArrayType(MRECT, 5), // 人脸框数组
faceOrient: MInt32RefType, // 人脸角度数组
faceNum: MInt32, // 检测到的人脸个数
faceID: MInt32RefType, // 在 VIDEO 模式下有效,IMAGE 模式下为空
});
const face = ffi.Library(config.faceEnginePath, {
ASFOnlineActivation: [MLong, [MPChar, MPChar]], // 用于在线激活
ASFInitEngine: [MLong, [MUInt32, MInt32, MInt32, MInt32, MInt32, MHandleRefType]], // 初始化获取句柄
ASFUninitEngine: [MLong, [MHandleRefType]], // 销毁
ASFGetVersion: [ref.refType(AFD_FSDK_Version), [MHandleRefType]], // 获取版本信息
ASFDetectFaces: [MLong, [MHandleRefType, MInt32, MInt32, MInt32, MUInt8RefType,ref.refType(LPASF_MultiFaceInfo)]]
});
fs.readFile(path.join(__dirname, "../", "1.bmp"), (err, imgData) => {
if (err) throw err;
let imgPo = ref.ref(imgData);
let pFaceRes = new LPASF_MultiFaceInfo();
pFaceRes.pointer = ref.NULL;
let ppFaceRes = pFaceRes.ref();
const state = face.ASFDetectFaces(handle, 160, 180, 0x201, imgPo, ppFaceRes);
if (!state) {
console.log("SUCCESS", ref.deref(ppFaceRes));
if (ref.deref(ppFaceRes).faceNum) {
console.log(ref.deref(ppFaceRes).faceRect[0])
}
} else {
console.log("ERROR", state);
return error(state)
}
});
但是我每次获取到的人脸数量都是空,我的图片是160*180的一张人脸图片,我用1.x的是可以正常识别的,求大佬指点一下,我的句柄获取是没有问题的,我测试过ASFGetVersion
获取版本号信息,是有内容,且内容是正确信息
您好。 可否百忙之中为 SDK V2 版本写个例子。
我现在用PYTHON 包装 V2版的SDK, 参照大佬的sample照葫芦画瓢,目前还在努力。
之前写纯Python,没这方面经验。
C:\Users\wbb\AppData\Local\Programs\Python\Python36\python.exe "F:/face/ARC/06080/python - 副本/web.py"
Traceback (most recent call last):
File "F:/face/ARC/06080/python - 副本/web.py", line 5, in
from arcsoft.AFD_FSDKLibrary import *
File "F:\face\ARC\06080\python - 副本\arcsoft\AFD_FSDKLibrary.py", line 35, in
internalLibrary = CDLL(u'face_detection.dll')
File "C:\Users\wbb\AppData\Local\Programs\Python\Python36\lib\ctypes_init_.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] 找不到指定的模块。
请问怎么解决啊 找了很久都解决不了 在其他人的电脑上没有问题
不知道是不是应该提问题到这里,SDK免费很好,
但是我稍微看了下例子,发现不管是
FD的AFR_FSDK_ExtractFRFeature //返回特征 应该是个长22020的数据
还是FR的AFR_FSDK_FacePairMatching //需要输入两个 上述特征数据
这两个方法,来回的数据都是指针,C我不是很熟悉,比如JAVA或者NodeJS,如果返回是特征指针,实现上比较困难,一般的预想是比如有个数据采集/录入的过程,把特征存入数据库比如MongoDB之类的,然后运营时,通过数据库获取原始数据和新数据比对,现在都是指针,也就是运行期才有的数据,这样该如何处理?
当然技术上自己写个C的小函数,因为有地址有长度,读写下内存也是可以的,
难道这就是收费部分的差别??
加载本地video的能运行了。
在有一个可用的webcam直连主机的情况下,调取camera运行有“No Camera“的报错;
在有一个可用的usb摄像头直连主机的情况下,调取camera运行有“assert here ..\FRDoorDemo\camerasource.cpp - 206 - CameraSource::Open”问题,加载不上摄像头。
请问这是什么问题,怎么解决?
报错AFD_FSDK_InitialFaceEngine ret 0x7006
这里是报错信息
java.lang.NoClassDefFoundError: Could not initialize class com.hdl.lib.CLibrary
com.hdl.api.FaceSaveClient.init(FaceSaveClient.java:61)
action.SaveFaceServlet.doPost(SaveFaceServlet.java:57)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
[DllImport("libarcsoft_fsdk_face_detection", CallingConvention = CallingConvention.Cdecl)]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.