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

ocv_qr_detect() returns incorrect coordinates on Linux #40

Open
ihellman opened this issue Jan 25, 2024 · 4 comments
Open

ocv_qr_detect() returns incorrect coordinates on Linux #40

ihellman opened this issue Jan 25, 2024 · 4 comments

Comments

@ihellman
Copy link

I recently submitted a feature request #39 to return the coordinates of the QR code in the image. The updated version works great on Windows and MacOS but on Linux (where I need it to run), the returned coordinates are the boundaries of the entire image, not the QR code. When draw = TRUE is on, the blue bounding box borders the entire image.

Some info about the system:
Ubuntu 22.04.3 LTS
R Version: 4.3.2
R Studio Server: 2023.06.0 Build 421

Example Command:
library(opencv)
img <- opencv::ocv_read("https://scoutek-media.s3.amazonaws.com/photos/76879639-ef2066158d.jpg")
opencv::ocv_qr_detect(img, draw = TRUE)

Output from above

opencv::ocv_qr_detect(img, draw = TRUE)
<pointer: 0x55c04fb35f50>
attr(,"class")
[1] "opencv-image"
attr(,"value")
[1] "top"
attr(,"points")
[,1] [,2]
[1,] 0 0
[2,] 1919 0
[3,] 1919 1079
[4,] 0 1079

@jeroen
Copy link
Member

jeroen commented Jan 25, 2024 via email

@ihellman
Copy link
Author

ihellman commented Jan 25, 2024

'quirc' returns NULL on both Windows and Linux.
'wechat' works on Windows but Linux returns the output above.

@jeroen
Copy link
Member

jeroen commented Jan 25, 2024

Yes I tried it myself as well, very strange. It works fine on other Linux distros like Fedora, but not on Ubuntu.

@ihellman
Copy link
Author

Thanks for the insight. I also works for me on Fedora and I was able to move my project over to that.

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