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

What is the meaning of get_rule_mask()? #41

Open
laolongboy opened this issue Jun 17, 2022 · 0 comments
Open

What is the meaning of get_rule_mask()? #41

laolongboy opened this issue Jun 17, 2022 · 0 comments

Comments

@laolongboy
Copy link

Thanks.

MeInGame/lib/dataset.py

Lines 264 to 273 in a699098

def get_rule_mask(image):
R = image[..., 0]
G = image[..., 1]
B = image[..., 2]
mask = (R > 95) & (G > 40) & (B > 20) & ((
np.max(image, axis=-1) - np.min(image, axis=-1)) > 15) & (R > G) & (R > B)
# mask = (R > 95) & (G > 40) & (B > 20) & (
# (np.max(image, axis=-1) - np.min(image, axis=-1)) >
# 15) & ((R - G) > 20) & ((R - B) > 20)
return mask

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

1 participant