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

[Feature Request] Add multichannel support to RandomShadow #1735

Open
ternaus opened this issue May 21, 2024 · 0 comments
Open

[Feature Request] Add multichannel support to RandomShadow #1735

ternaus opened this issue May 21, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ternaus
Copy link
Collaborator

ternaus commented May 21, 2024

RIght now we have:

mask = np.zeros_like(img, dtype=np.uint8)
cv2.fillPoly(mask, vertices_list, (max_value, max_value, max_value))

in add_shadow function.

cv2.fillPolly, does not work with the number of channels > 4

=>

  1. if number of channels is larger than 4, create mask for 1 channel and replicate it to the desired number of channels.
  2. check that everything works for grayscale image
  3. tests
  4. update docstrings in add_shadow and RandomShadow
@ternaus ternaus added enhancement New feature or request good first issue Good for newcomers labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant