GithubHelp home page GithubHelp logo

多线程调用 about libfacedetection HOT 8 CLOSED

shiqiyu avatar shiqiyu commented on July 4, 2024
多线程调用

from libfacedetection.

Comments (8)

ShiqiYu avatar ShiqiYu commented on July 4, 2024

这个版本有问题!请用上一个版本,抱歉!我们马上更新。

2016年11月16日星期三,sean028 [email protected] 写道:

您好,11 月 10 日更新的这个版本您说的是可以在多线程调用,但是我用 VS2015(以及 opencv
3.1)测试发现,还是没法多线程同时调用啊,必须要加锁。
另外,您提供的 dll 似乎是 VS2010 编译的,而新版的接口里面用到了 vector,编译器版本不匹配时在 vector
析构的时候就会出现问题,除非调用之前为 vector 预留足够的空间。


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#22, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AG0eHRBZitz4JFGhWioFlAH8fU9_qUKpks5q-qlBgaJpZM4KzdbP
.

Dr. Shiqi YU (于仕琪)
School of Computer Science and Software Engineering,
Shenzhen University, 518060, China
+86-755-2673 3127

from libfacedetection.

shz0519 avatar shz0519 commented on July 4, 2024

于老师您好,我前几天下了最新版本,也出现了上述的问题,但是在网上找不到上一个版本了,您能发我一份吗?[email protected]

from libfacedetection.

ShiqiYu avatar ShiqiYu commented on July 4, 2024

你研究一下GitHub用法,上面有所有历史记录。

2016年11月16日星期三,shz0519 [email protected] 写道:

于老师您好,我前几天下了最新版本,也出现了上述的问题,但是在网上找不到上一个版本了,您能发我一份吗?[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#22 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AG0eHQSoYxeyLX5lDZHjbn9jyyuLPwkOks5q-raQgaJpZM4KzdbP
.

Dr. Shiqi YU (于仕琪)
School of Computer Science and Software Engineering,
Shenzhen University, 518060, China
+86-755-2673 3127

from libfacedetection.

EncodeTS avatar EncodeTS commented on July 4, 2024

@shz0519 https://github.com/ShiqiYu/libfacedetection/commits/master
在这里可以看到所有提交记录,点最右边的<>符号然后下载该版本就行了。

from libfacedetection.

shz0519 avatar shz0519 commented on July 4, 2024

谢谢啊

在 2016-11-16 16:04:07,"Su Tang" [email protected] 写道:

@shz0519https://github.com/ShiqiYu/libfacedetection/commits/master在这里可以看到所有提交记录,下载对应版本就行了


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

from libfacedetection.

chai2010 avatar chai2010 commented on July 4, 2024

头文件含有 C++元素 std::vector.
对于动态库来说, 不同的VC版本之间vector的二进制接口是不兼容的, MinGW同样是不兼容.
(C++没有二进制接口标准, C++头文件含有代码(编译时和使用者的VC并不同)导致问题更严重, 各个编译器实现都不一样).

最安全的方式是头文件只包含必要的C语言声明语句.

可以将 std::vector 重新包装为C接口:

typedef struct FaceInfoList_T FaceInfoList_T;

FaceInfoList_T* FaceInfoList_New();
void FaceInfoList_Delete(FaceInfoList_T* p);

int FaceInfoList_Size(FaceInfoList_T* p);
FaceInfo* FaceInfoList_At(FaceInfoList_T* p, int i);

或者直接传入一个 FaceInfo 数组, 给出最大长度:

int facedetect_frontal(FaceInfo faces[], int faces_length, ...);

返回结果不超出数组容量就行了.

from libfacedetection.

ShiqiYu avatar ShiqiYu commented on July 4, 2024

谢谢你的建议,我已经用第二个方案改写了,再测试一下就放上来。

2016年11月16日星期三,chai2010 [email protected] 写道:

头文件含有 C++元素 std::vector.
对于动态库来说, 不同的VC版本之间vector的二进制接口是不兼容的, MinGW同样是不兼容.
(C++没有二进制接口标准, C++头文件含有代码(编译时和使用者的VC并不同)导致问题更严重, 各个编译器实现都不一样).

最安全的方式是头文件只包含必要的C语言声明语句.

可以将 std::vector 重新包装为C接口:

typedef struct FaceInfoList_T FaceInfoList_T;

FaceInfoList_T* FaceInfoList_New();void FaceInfoList_Delete(FaceInfoList_T* p);
int FaceInfoList_Size(FaceInfoList_T* p);
FaceInfo* FaceInfoList_At(FaceInfoList_T* p, int i);

或者直接传入一个 FaceInfo 数组, 给出最大长度:

int facedetect_frontal(FaceInfo faces[], int faces_length, ...);

返回结果不超出数组容量就行了.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#22 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AG0eHVby4H9JAEYYuNfzW-MadJZ0YyD9ks5q-tChgaJpZM4KzdbP
.

Dr. Shiqi YU (于仕琪)
School of Computer Science and Software Engineering,
Shenzhen University, 518060, China
+86-755-2673 3127

from libfacedetection.

ShiqiYu avatar ShiqiYu commented on July 4, 2024

Hi, guys, thank you for reporting bugs. I have fixed the bug and uploaded the lib to GitHub. Please download the newest version and test it. Enjoy!

from libfacedetection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.