HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > CEN - 372 Homework > problem:


2015-20. 50518 - Histogram Equalization

CEN - 372 Homework

Start: Sep.16.2015 at 10:00:00 AM
Finish: May.16.2016 at 02:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (4)

Contest problems

• 2015-10. 50517 - Confusion Matrix
• 2015-20. 50518 - Histogram Eq...
• 2015-30. 50519 - Image Filtering
• 2015-40. 50498 - K-Means
• 2015-50. 50659 - Covariance Matrix
• 2015-60. 50505 - kht Puzzle
• 50. 50796 - KNN

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
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