ftylitak/qzxing

How can i rotate the captureRect of QZXingFilter

MichaelSavchenko67 opened this issue · 7 comments

return videoOutput.mapRectToSource(videoOutput.mapNormalizedRectToItem(Qt.rect(

Hello @MichaelSavchenko67

I am not really sure what you want to do. I would say it is just a matter how you define the Qt.rect(). The constructor of the Qt.rect takes 4 arguments (x, y, width and height ) just adjust it based on your needs.

By default, the source code uses decimal values which are the persentage of width or height.

Was this any helpfull?

How do I rotate the readout image? Now the barcode is read vertically, but how to read it horizontally?

Hello @MichaelSavchenko67 and @DenPonomarchuk

a long time ago @Eism proposed a solution to this in issue #120
I have just push a new branch with this solution: https://github.com/ftylitak/qzxing/tree/qzxingfilter-orientation-support

Since I have an issue with my build environment right now, could any of you pull the latest changes from that branch and test it if it working? Otherwise I believe sometime till tomorrow I will manage to test it myself.

It works. The only thing is, it is better to use QTransform instead of QMatrix (recommendation from Qt).
QTransform matrix;.

Eism commented

I'm happy that after two years my solution became useful :)

Its was my bad all this time, I had forgotten to merge it back then.

I have just pushed the latest changes to that branch. I would really appreciate if you could once again verify that it works as needed. As soon as this happens, it will be merged to the master branch.

Thank you all very much for your contribution and testing!

Horizontal reading is successful! The value of the parameter orientation being set - works! Thanks for the merge to master.