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

Which trans module do you use? #1

Open
pavlobu opened this issue Dec 1, 2016 · 4 comments
Open

Which trans module do you use? #1

pavlobu opened this issue Dec 1, 2016 · 4 comments

Comments

@pavlobu
Copy link

pavlobu commented Dec 1, 2016

I'm using your python code to develop my app but I have the problem with this part

warped = trans.four_point_transform(img, src)
in file qrcode.py line 274

when it reaches this part it says:

AttributeError: 'module' object has no attribute 'four_point_transform'

indeed trans I installed from pip doesn't have it.

Can you help?

@F2Wang
Copy link

F2Wang commented Dec 1, 2016

HI,
sorry you had to read my shitty code, I adapted this from a guy who wrote it for RASPBERRYPI, and made the code look even messier, I never intended to have anyone find it...

You can use the transform1.py under computer vision, and change the code to
warped,rect,maxWidth,maxHeight,dimension = transform1.four_point_transform(img,src)

although you may only need to use wrapped

I made some changes in the four-point-transform function so that you can obtain a top down bird eye view of the qr, which allows you to have your qr code identified at various tilting angles.thi function also contains a lot of nonsensical stuff I hard coded in to work for my purpose at the moment...you can simply ignore it.

Hope this helps

@FelixKunzJr
Copy link

HI,
I have the same problem as hexenskull. How did you solve it? Where can i find the transform1.py?

Any News?

@F2Wang
Copy link

F2Wang commented Jul 12, 2017 via email

@ashishguptasanu
Copy link

Hello Guys,
I have found solution for this issue. Actually trans is not a module here.
Just download this file motion/transform.py & move into your folder.
Instead of using: import trans use import transform

Change warped = trans.four_point_transform(img,src) to warped= transform.four_point_transform(img,src)

Note: Here trans is not a module, it's a file named transform & four_point_transform is a function of that file.

I hope this will help. Now we can close this.

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

4 participants