/* This takes in as input, an image file
and gives as output the 2D array or
a matrix representation of the image
whose elements are the intensities of the pixel
FILE *fp1, *fp2;
fp1 = fopen("pic.bmp", "r"); /* Input, the image file in the bin folder */
fp2 = fopen("pic.doc","w");
fprintf(fp2,"%d",str[i][j]);/* the value read */
This is the program i have written. I guess this does read the picture, takes in the values of the pixels. And i have printed the ouput matrix to a word doc. And lo! i get the following output. I now wanna know if this is the real procedure.
If there are any built-in C functions that calculate the pixel intensities, do tell me...
The output of the above program is attached...thanks in advance....