geaxgx / playing-card-detection

MIT License
421 stars 141 forks source link

3 card scene generation #10

Open frozenranger opened 5 years ago

frozenranger commented 5 years ago

Dear Geaxgx,

When generating the 3 card scene I get the error: ValueError: could not broadcast input array from shape (726,500,4) into shape (0,250,4)

However the 2 card scene is working just fine and I was able to make my own 1 card scene using similar code to yours. I noticed that you said in the comments that the decal values have to be different for the 3 card scene. What do I need to change in order to make the 3 card scene work?

specifically the error occurs with this line of code:

self.img3[decalY3:decalY3 + cardH, decalX3:decalX3 + cardW, :] = img3

img3 shape = 726,500,4 self.img3[decalY3:decalY3 + cardH, decalX3:decalX3 + cardW, :] shape = 0,250,4

Should I try to resize img3 to make this work?

Thank you

lei-cao commented 1 year ago

I ma facing the same problem, for both create2CardsScene and create3CardsScene not sure what's wrong with it ValueError: could not broadcast input array from shape (1475,1070,4) into shape (378,180,4)