traffic_count/image_filtering_debugging_C/edgeDetector.c
void writeImage (char *filename, unsigned char *outputImage, unsigned char *header, unsigned int height, unsigned int width)
{
    FILE *outputFile;
    if (outputFile = fopen (filename, "wb")) {
        fwrite (header, sizeof (unsigned char), HEADER_LEN, outputFile);
        fwrite (outputImage, sizeof (unsigned char), height * width * DEPTH, outputFile);
        fclose (outputFile);
    }
    else {
        printf ("Error while opening output file\n");
    }
}
/*Store an image in the specified file. It takes the grid of RGB pixels, its height and widht and the array of the image header data*/
Store an image in the specified file. It takes the grid of RGB pixels, its height and widht and the array of the image header data
Store an image in the specified file . It takes the grid of RGB pixels its height and widht and the array of the image header data
void writeImage (char *filename, unsigned char *outputImage, unsigned char *header, unsigned int height, unsigned int width)
{
    FILE *outputFile;
    if (outputFile = fopen (filename, "wb")) {
        fwrite (header, sizeof (unsigned char), HEADER_LEN, outputFile);
        fwrite (outputImage, sizeof (unsigned char), height * width * DEPTH, outputFile);
        fclose (outputFile);
    }
    else {
        printf ("Error while opening output file\n");
    }
}
void writeImage ( char * filename , unsigned char * outputImage , unsigned char * header , unsigned int height , unsigned int width ) { FILE * outputFile ; if ( outputFile = fopen ( filename , " " ) ) { fwrite ( header , sizeof ( unsigned char ) , HEADER_LEN , outputFile ) ; fwrite ( outputImage , sizeof ( unsigned char ) , height * width * DEPTH , outputFile ) ; fclose ( outputFile ) ; } else { printf ( " \n " ) ; } }
Store an image in the specified file.
Store an image in the specified file .