ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Арифметика > задача:


50518 - Histogram Equalization

Гость
• Вопросы к жюри (4)

Задачи раздела

• 50807 - Euro to Leke
• 50433 - Sum of Cubes
• 50871 - Harmonic Mean
• 50521 - Pound to Grams
• 50432 - Numbers and Squares
• 50510 - What floor are they?
• 50870 - ZScore normalization
• 50797 - Nr of Missing Guests
• 50518 - Histogram Equalization
• 50522 - Multiplication Table - 2
• 50814 - Buying Books from Internet
• 50812 - Total Discount for the clients
• 50435 - City Electric Bills
• 50527 - Sum of LCMs
• 50539 - Number of Chairs - 2
• 50532 - Close City
• 50379 - a^b modulus k

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

Histogram Equalization

In digital image processing Histogram Equalization is a common method to distribute intensity values equally to entire range of intensity values. The following function is used to distribute the intensity values:


where r is the input image, s is the transformed image, L represents the intensity range (2n-1 , either 7, 15, 31, 128, 255 or etc. ) pr(rj) is the frequency of the intensity value of (rj).

Question: Write a program that reads MxN image information and it prints the distribution of intensities for the new image.

Input specification
You will be given two integers in the beginning: the number of rows (M) and the number of columns (N). Then in the following M lines you will be given N integers where 1 ≤ M ≤ 300 and 1 ≤ N ≤ 300. Note: You need to identify L from the given data.

Output specification
Show the new distribution of intensities in increasing order. Do not show an intensity if it is not used in the new image.

Sample Input I
7 5
1 0 0 1 3
1 2 0 2 0
1 0 0 0 7
1 1 6 7 1
0 1 2 5 6
1 0 2 0 7
2 2 7 1 4
Sample Output I
2 10
4 10
5 7
6 4
7 4


Для отправки решений необходимо выполнить вход.

www.contester.ru