Skip to content

fix: in-odered polygon#39

Open
sushil-bharati wants to merge 1 commit into
NaturalHistoryMuseum:masterfrom
sushil-bharati:master
Open

fix: in-odered polygon#39
sushil-bharati wants to merge 1 commit into
NaturalHistoryMuseum:masterfrom
sushil-bharati:master

Conversation

@sushil-bharati

Copy link
Copy Markdown

This fix will allow obtaining in-ordered polygon vertices for bar/QR code irrespective of the angular placement of the bar/QR code in the scene. This will certainly help for those who are trying to determine the in-order corners of the QR/bar code in the scene i.e. anti-clockwise from the top-left for an upright position.

Comment thread pyzbar/pyzbar.py

# since 'polygon' is very misleading if one wants to detect the QR/bar
# code position in order no matter how they appear in the scene
polygon_upright = list(map(Point._make,(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the naming more misleading now, since polygon_upright implies that it is invariant in regard to 90° rotations, which is not the case for your variant.

Also you could rename this to polygon and remove the definition above.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check PR #78

@esclear esclear mentioned this pull request Aug 14, 2019
@mcbridejc

Copy link
Copy Markdown

This PR is IMHO the correct way to order the returned polygon, and I'd love to see this merged and released. I'm currently using sushil-bharati:master and it works for me.

@coolacid

Copy link
Copy Markdown

Given this PR hasn't been merged (and looks like it might not due to the PR change request - is there a way to accomplish this post detection? I'd like to be able to rotate an image based on the detected orientation of the QR code, and I suspect this is going to be my blocker.

@mcbridejc

Copy link
Copy Markdown

@coolacid I'm not aware of a simple way to do so. I've been using the sushil-bharati fork because of this problem. I'd really like to see this get fixed. I wonder if the maintainer of this project is still working on it, and would like to chime in? This may be a case where it makes sense to petition to re-assign ownership of the pyzbar package on PyPi if the current owner is unavailable.

@coolacid

Copy link
Copy Markdown

@mcbridejc Thanks. I'd thing that the maintainer is waiting on @sushil-bharati to fix based on the feedback in the PR before merging.

@alexander-soare

Copy link
Copy Markdown

For what it's worth, I also have the same need. In any case, thank you to the author for their good work!

@LilithHafner

Copy link
Copy Markdown

Thanks @sushil-bharati! Like @mcbridgejc, I've switched to sushil's version. I ran:

pip uninstall pyzbar
pip install pip install git+https://github.com/sushil-bharati/pyzbar.git

Everything work and the points are in a consistent order!

@Camilochiang

Copy link
Copy Markdown

@quicklizard99 is 2022 and this problem is still around. Is there any way to merge or solve it? Thanks

@pablospe

pablospe commented Nov 2, 2022

Copy link
Copy Markdown

I started using this fork:
https://pypi.org/project/pyzbar-upright/

@lunasara

Copy link
Copy Markdown

This is a great update! Are there any plans on merging this feature to avoid switching to unmaintained versions of the code?

@tykateetee

Copy link
Copy Markdown

Wow. I have been trying to order them for so long and this is the solution? As simple as it may be, this is amazing work! Don't know why this isn't merged, as it helps severely for absolute orientation of a QR code.

@sushil-bharati

Copy link
Copy Markdown
Author

@esclear - would you be able to merge this PR?

@esclear

esclear commented Sep 10, 2024

Copy link
Copy Markdown

@esclear - would you be able to merge this PR?

No, I don't have and never had the permissions for 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

Successfully merging this pull request may close these issues.

10 participants