Skip to content

Conversation

@Wanderer76
Copy link

No description provided.

def set_grey_color(arr, averageValue, blockSize, i, j, step):
for row in range(i, i + blockSize):
for col in range(j, j + blockSize):
greyValue = averageValue // 50 * step // 3
Copy link
Owner

Choose a reason for hiding this comment

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

Надо было делить не на 50, а на step



def transform_image(file_name, gradation, blockSize):
image = Image.open(file_name)
Copy link
Owner

Choose a reason for hiding this comment

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

Если вы открываете файл в функции, то и сохранять файл желательно в этой же функции.

Copy link
Owner

Choose a reason for hiding this comment

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

Лучше передавать в эту функцию изображение в виде массива Numpy.

@railbotan
Copy link
Owner

На будущие папку .idea/ надо добавлять в .gitignore

@railbotan
Copy link
Owner

Кому мне оценку ставить? Нигде нет вашего ФИО

@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