Average filtering, median filtering, and Edge detection
The program should do the following:
Prompt the user to enter a file name.
The program should open the file provided. You can assume that the file will be a PGM image file (described below). If the file does not exist, or is not properly formatted, your program should exit.
The program should run an average filter on the image and save the result as “average.pgm”.
The program should run a median filter on the image and save the result as “median.pgm”.
The program should run an edge detection on the image and save the result as “edge.pgm”.
The program can then exit
So bascially the program is filtering pgm file