1 /* linescan.c -- linescan @ width/2 */
4 * author: frank.zirkelbach@physik.uni-augsburg.de
16 int main(int argc,char **argv) {
23 printf("usage: %s <filename>\n",argv[0]);
29 strcpy(bmp.file,argv[1]);
33 dprintf(2,"width = %d ... delta x = %d.\n",bmp.info.width,DX);
36 for(y=0;y<bmp.info.height;y++) {
39 val+=(1.0*(bmp.map[x+d].r+bmp.map[x+d].g+bmp.map[x+d].b)/3);
40 printf("%f %f\n",1.0*(bmp.info.height/2-y)/(bmp.info.width*3),val);
41 //printf("%f %f\n",1.0*(bmp.info.height/2-y)/(bmp.info.width),val);