Skip to content

Comments

Байгилдина Анастасия#5

Open
NastyaBay wants to merge 8 commits intorailbotan:mainfrom
NastyaBay:Байгилдина_Анастасия

Hidden character warning

The head ref may contain hidden characters: "\u0411\u0430\u0439\u0433\u0438\u043b\u0434\u0438\u043d\u0430_\u0410\u043d\u0430\u0441\u0442\u0430\u0441\u0438\u044f"
Open

Байгилдина Анастасия#5
NastyaBay wants to merge 8 commits intorailbotan:mainfrom
NastyaBay:Байгилдина_Анастасия

Conversation

@NastyaBay
Copy link

No description provided.

filter.py Outdated
n2 = arr[n][n1][1]
n3 = arr[n][n1][2]
M = n1 + n2 + n3
M = (int(n1) + int(n2) + int(n3))/3
Copy link
Owner

Choose a reason for hiding this comment

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

Вместо n1 должно быть n11

filter.py Outdated
pixels[index_x][index_y][2] = int(gray // step) * step


def convert_gray_img(size_x, size_y, step):
Copy link
Owner

Choose a reason for hiding this comment

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

Вы работаете с pixels как с глобальной переменой, лучше передавать pixels как параметр функции

filter.py Outdated
i = i + 10
res = Image.fromarray(arr)
pixels = np.array(img)
res = Image.fromarray(convert_gray_img(10, 10, 50))
Copy link
Owner

Choose a reason for hiding this comment

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

Нужно было задать количество градаций серого и затем вычислить шаг.

@railbotan
Copy link
Owner

5

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.

2 participants