brandelli / Home

Tesntando git
25 stars 14 forks source link

Which trans module do you use? #1

Open pavlobu opened 7 years ago

pavlobu commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

Any News?

F2Wang commented 7 years ago

Here you go...still I don't suggest using the code...


From: Felix Kunz notifications@github.com Sent: Wednesday, July 12, 2017 3:47:05 AM To: brandelli/Home Cc: Fan Wang; Comment Subject: Re: [brandelli/Home] Which trans module do you use? (#1)

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

Any News?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_brandelli_Home_issues_1-23issuecomment-2D314683713&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=B-RI8_580p2SmK5PnoFsEkSvNN1P6s9W2mW3avCBuHA&m=c_Af6l4k2eJJIS0lEvvYJE8s1akT0dpkbnyOqRrV9T8&s=VA5oheSLwuSSjagjdYnLGW35TnVY8BRjOWcV2TyM1A8&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ATeuujf9XVWtdrw5ja70EOLZHziRcnddks5sNHn5gaJpZM4LBOGx&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=B-RI8_580p2SmK5PnoFsEkSvNN1P6s9W2mW3avCBuHA&m=c_Af6l4k2eJJIS0lEvvYJE8s1akT0dpkbnyOqRrV9T8&s=WyUacI2atAGiwzncklWe1d1g0EYsi4hwOjtCSUnRqB8&e=.

ashishguptasanu commented 6 years ago

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.