Fix issue #299 - #300
Conversation
| mask = np.zeros((height, width)) | ||
| cv2.fillPoly(mask, [polygon], color=1) | ||
|
|
||
| # Empty numpy array check |
There was a problem hiding this comment.
Thank you for addressing the bug; I suggest using if polygon.size > 0: to directly check for an empty array, ensuring against cases with all-zero coordinates.
|
Hi, @ShubhamKanitkar32 👋🏻! Thanks a lot for submitting a PR so fast. We definitely can't allow It seems reasonable for me for the Maybe we should move that fix to |
|
@SkalskiP no problem, happy to contribute! I agree with you. It makes more sense for it to live under |
|
Awesome @ShubhamKanitkar32! 🔥 In that case, I have to ask you for two things:
Once again thanks for helping us to get to the bottom of this problem 🙏🏻 |
|
Hi @ShubhamKanitkar32 👋🏻! I think we are ready to implement. Take a look at my last comment under your issue: #299 (comment) |
|
Hi, @ShubhamKanitkar32 I've made some changes to your implementation and added unit tests to make sure it works as expected. I'm merging changes into |
|
btw, @onuralpszr I love per-commit |
Description
Fixes issue - #299
Type of change
Please delete options that are not relevant.
How has this change been tested, please provide a testcase or example of how you tested the change?
Test script provided under the issue