histogram equalization transformation function

5 views (last 30 days)
Suppose that a given 3-bit image(L=8) of size 64*64 pixels (M*N=4096) has the intensity distribution shown as below. How to obtain histogram equalization transformation function and then compute the equalized histogram of the image?
Rk nk
0 800
1 520
2 970
3 660
4 330
5 450
6 260
7 106
  2 Comments
Saiteja B
Saiteja B on 22 Nov 2019
Did u get the code for histeq without matlab tool or code for your mentioned problem,if yes please post here? Thank u.!!
CANDY
CANDY on 4 Oct 2022
hi dear were you able to get the answer to this work ?
if yes , can you show me the codes ?

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 9 Dec 2018
Call histeq() followed by imhist().
  2 Comments
pandu hanifa
pandu hanifa on 9 Dec 2018
Edited: pandu hanifa on 9 Dec 2018
if equation i know how to finish it,, i want to know the code( without in-built function matlab), and if its c++ i aldy try and can,, but in matlab the code i write keep eror idk why
rk nk c sk = c/MN (L-1)sk rounded value
0 800 800 0.195 1.365 1
1 520 1320 0.322 2.254 2
2 970 2290 0.559 3.913 4
3 660 2950 0.720 5.04 5
4 330 3280 0.801 5.601 6
5 450 3730 0.911 6.377 6
6 260 3990 0.974 6.818 7
7 106 4096 1.000 7.0 7
Image Analyst
Image Analyst on 9 Dec 2018
Why without built-in functions???
Why would you want to compute the histogram, then the cdf, then invert it, and use intlut() when you can just do it in one line of code?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!