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

Improved qzxingfilter #13

Merged
merged 19 commits into from
Jan 14, 2017
Merged

Improved qzxingfilter #13

merged 19 commits into from
Jan 14, 2017

Conversation

milianw
Copy link
Contributor

@milianw milianw commented Jan 10, 2017

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.

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.
@ftylitak
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants