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 algorithmCodePudding 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 255Gray2 [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