void histogram_equalization(Bmp_Image bmp, double *histogram,Modified_Image *new_image, double *new_histogram)
{
int bWidth = bmp.get_Width();
int bHeight = bmp.get_Height();
int bBitCount = bmp.get_BitCount();
int number = int(pow(2.0,(bBitCount/3)));
int total_number = 3*number;
calculate_histogram(bmp,histogram);
for (int i=0; i<total_number; i++)
{
new_histogram[i] = 0;
}
//******************test calculate_heq*****************//
/*
char *filename = "D:\\MATLAB\\digital_image_processing\\initial_heq.dat";
FILE *stream;
errno_t err;
if ((err=fopen_s(&stream,filename,"wb")) != 0)
{
printf("The file %s was not opened\n",filename);
}
else
{
printf("The file %s was opened\n",filename);
}
fwrite(histogram, sizeof(double), total_number, stream);
fclose(stream);
*/
//****************test end******************************//
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载