Вдовин Артемий. Технология SEQ. Линейная фильтрация изображений (блочное разбиение). Ядро Гаусса 3x3. Вариант 26#57
Open
VdovinKNT wants to merge 2 commits intolearning-process:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Описание алгоритма
Алгоритм представляет собой последовательную блочную гауссову фильтрацию (Gaussian Blur) для RGB-изображения с использованием свёртки ядром 3×3. Цель – сгладить изображение, уменьшая шум и резкие перепады яркости, за счёт усреднения значений пикселей с весами, заданными гауссовым ядром.
Этапы алгоритма
width = height = in.Для каждого из 3 каналов (R, G, B) считается взвешенная сумма значений соседних пикселей с ядром:
[
]
затем результат нормализуется делением на сумму весов (16).
Граничные пиксели обрабатываются корректно за счёт "прижатия" индексов к допустимому диапазону (clamp), то есть используются ближайшие допустимые координаты.
outputзадачи.Чеклист
vdovin_a_gauss_block_seqclang-formatлокально в моем форке (нет ошибок форматирования)clang-tidyлокально в моем форке (нет предупреждений/ошибок)vdovin_a_gauss_block_seq), а не вmaster