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

Function that determines the contrast ratio, max and min brightness #156

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Giovaaanniii
Copy link
Contributor

The function is to determine the maximum and minimum brightness values of pixels of different colors and, thanks to them, calculate the contrast ratio using the formula approved by WCAG

Conclusion: brightness and contrast values

Иван Горбунов added 4 commits December 18, 2024 18:55
…ghtness

the function is to determine the maximum and minimum brightness values of pixels of different colors and, thanks to them, calculate the contrast ratio using the formula approved by WCAG

Conclusion:  brightness and contrast values
@@ -428,3 +428,25 @@ def find_regexp_text(recognized_list: list, pattern):
if len(match) > 0:
result.append((roi, content, tuple(match)))
return list(set(result))


def br_determinant(img):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image_path

maximum brightness and contrast values on the image itself

Args:
img (str): image that is converted from the BGR color space to YUV
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create an Image type from Pillow

@@ -428,3 +428,25 @@ def find_regexp_text(recognized_list: list, pattern):
if len(match) > 0:
result.append((roi, content, tuple(match)))
return list(set(result))


def br_determinant(img):
Copy link
Contributor Author

@Giovaaanniii Giovaaanniii Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change name 2 constarst

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

Successfully merging this pull request may close these issues.

1 participant