-
Notifications
You must be signed in to change notification settings - Fork 345
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
Improved qzxingfilter #13
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Otherwise this leads to access of uninitialized, when one forgets to set a custom list of decoders.
- allow autofocus and manual focus - count number of tags matched - allow configuring the barcode scanner from QML
This allows one to only detect within a certain unscaled region of the input frame. The reduction of pixels scanned leads to a significant performance win, and the removal of the scaling improves the quality of the checked image, thereby leading to higher detection rates.
Additionally, this is only done until a match is found, instead of always applying mirroring for the 2nd, 3rd and 4th frames.
This dramatically improves the performance of the QZXingFilter.
Do not call detaching QByteArray::data, use constData instead. Also hoist some constants out of the inner conversion loops and make more variables const.
This was encountered on a recent Android device.
The qtmn hack is not required anymore.
This again leads to a noticeable performance improvement of the QZXingFilter example, as we get rid of one full copy of the image data by converting directly into greyscale, instead of first converting to RGB and then converting to greyscale.
This improves the performance since we only need to convert the actually interesting part of the frame, instead of the full frame.
This removes another copy of frame data, thereby improving the FPS of the QZXingFilter example noticeably.
The filter is much more performant than using the QZXing API in an imparative way for the use-case of live-analyzing video frames in QML.
Hello @milianw i am impressed with your contribution! I really appreciate it and I am sure many others will too! During the weekend I will review the changes and get back to you. Best regards |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tons of improvements that we would like to upstream. The performance improvements are huge, and one could go even further by writing to an
ArrayRef<byte>
matrix directly from within the filter, bypassing QImage completely. At that point, one is as close to zero-copy as possible, if I'm not mistaken. The QByteArray copy will still be required though.