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

Update opencv version and add camera support #620

Open
xiaowodaweiwang opened this issue May 7, 2022 · 3 comments
Open

Update opencv version and add camera support #620

xiaowodaweiwang opened this issue May 7, 2022 · 3 comments

Comments

@xiaowodaweiwang
Copy link

Hi, @mhsmith , I've tried an android project which used cv2.wechat_qrcode_WeChatQRCode function in opencv. So I tried to build with help of chaquopy by using 'pip install opencv', then opencv with the version 4.5.1.48 was installed and no error happend during build, but an error occured "AttributeError: module 'cv2.cv2' has no attribute 'wechat_qrcode_WeChatQRCode'" during run the project, so I update the opencv version by change build "pip install opencv==4.5.4.60", cause of wechat_qrcode_WeChatQRCode only included after version 4.5.2 of opencv. But an error "Process 'command 'py'' finished with non-zero exit value 1" happened during build.
I would appreciate it if you could solve this problem, thanks!

@mhsmith
Copy link
Member

mhsmith commented May 7, 2022

Thanks for the report. We're not planning to update this package in the near future, but if you'd like to try building the new version yourself, follow the instructions here. And if you're successful, please make a pull request so we can add the new version to the public repository.

Alternatively, it looks like you could use the QRCodeDetector API (example here), which is available in Chaquopy's current OpenCV version.

If anyone else needs a new version of this package, please click the thumbs up button above, and post a comment explaining why you need it.

@xiaowodaweiwang
Copy link
Author

Thank you very much for your help!

@mhsmith
Copy link
Member

mhsmith commented Sep 16, 2023

The next time we update OpenCV, we should see if it's possible to enable its camera API, which apparently had some Android improvements in version 4.5.2:

Older links (probably not useful):

Previous discussion: #303

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

No branches or pull requests

2 participants