Home > Back-end >  BCB in image processing, histogram equalization, which master to explain this few lines of code
BCB in image processing, histogram equalization, which master to explain this few lines of code

Time:10-14

Int colorvalue [300] [300]={0};
Int gray1 [256]={0}, gray2 [256]={0}, sum [256]={0};
.
.
.
The sum [I]=sum [I - 1) + gray1 [I];
Gray2 [I]=(int) (sum [I] * 255/90000 + 0.5);
Trouble help explain what the inside? Thanks a lot!

CodePudding user response:

You find a book of image processing, look at the inside algorithm

CodePudding user response:

Thank you, I am a beginner, a quiet!

CodePudding user response:

The sum [I]=sum [I - 1) + gray1 [I];//will histogram accumulation from 0 to 255
Gray2 [I]=(int) (sum [I] * 255/90000 + 0.5)//will be sent to you by accumulative histogram, the original gray I is mapped to a new gray level, including 30 * 90000=300
  • Related