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

cv::mat Thread handling #1

Open
Regalith opened this issue Feb 1, 2024 · 1 comment
Open

cv::mat Thread handling #1

Regalith opened this issue Feb 1, 2024 · 1 comment

Comments

@Regalith
Copy link

Regalith commented Feb 1, 2024

Might want to take a look at properly handing over the cv::mat from the java to native thread in the app. That segfault is probably caused by calling processFrame in the UI thread and passing the cv::mat to a native thread. Wrapping that function call in

runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    processFrame(img.getNativeObjAddr());
                }
            });

will solve the crash, but constrain everything to be run on the UI thread killing performance.

@nickw1
Copy link
Owner

nickw1 commented Sep 10, 2024

@Regalith thanks for the suggestion. Sorry for the late reply btw, it's been a while since I've looked at this repo.

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

2 participants