-
Notifications
You must be signed in to change notification settings - Fork 13
Галкин Даниил #6
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
base: main
Are you sure you want to change the base?
The head ref may contain hidden characters: "\u0413\u0430\u043B\u043A\u0438\u043D_\u0414\u0430\u043D\u0438\u0438\u043B"
Conversation
налажена работа с граничными условиями, в результате чего справа и внизу не остаётся необработанных полос по 10 пикселей исправлена формула расчёта компонентов серого цвета исправлено неверные название переменной
Были переименованы переменные, названия стали более понятны Добавлена возможность управлять размерами мозайки и градациями серого Были выделены функции
…льтата, путь изображения, количество градаций и размер мозайки
filter.py
Outdated
| gradations = 255 // count_gradations | ||
| pixel_x = 0 | ||
|
|
||
| def find_average_brightness(array, px_width, px_height, mosaic): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Функция find_average_brightness создается внутри функции do_filter при каждом вызове do_filter. Функция find_average_brightness должна быть объявлена вне функции do_filter
filter.py
Outdated
| average_bright = int(sum_brightness // mosaic_size ** 2) | ||
| return average_bright | ||
|
|
||
| def paint_cell(array, px_width, px_height, mosaic): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Аналогично с find_average_brightness
|
Все ОК! |
|
5 |
No description provided.