Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在on_image_render函数下增加对输入图像rgb进行灰度化,结果会导致手机上闪退 #5

Closed
meixiansen opened this issue Aug 20, 2021 · 0 comments

Comments

@meixiansen
Copy link

具体代码
`void MyNdkCamera::on_image_render(cv::Mat& rgb) const
{
if (rgb.empty())
return;
cv::Mat src = rgb.clone();
cv::Mat matGray;
cv::cvtColor(src, matGray, CV_RGB2GRAY);
// nanodet
{
ncnn::MutexLockGuard g(lock);

    if (g_yolox)
    {
        std::vector<Object> objects;
        g_yolox->detect(rgb, objects);

        g_yolox->draw(rgb, objects);
    }
    else
    {
        draw_unsupported(rgb);
    }
}

draw_fps(rgb);

}进行debug,具体报错E/cv::error(): OpenCV(4.5.3) Error: Requested object was not found (could not open directory: /data/app/com.tencent.ncnnyolox-tvY0PkV6XrQyBx4J6SbZxw==/base.apk!/lib/arm64-v8a) in glob_rec, file /home/runner/work/opencv-mobile/opencv-mobile/opencv-4.5.3/modules/core/src/glob.cpp, line 273
A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 975 (ImageReader-640), pid 32479 (ncent.ncnnyolox)`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant