Question: p1) Write a program to read an image of PGM P2 format, and produce its negative image and its90-degree clockwise rotation. Your program should take

p1)

Write a program to read an image of PGM P2 format, and produce its negative image and its90-degree clockwise rotation.

Your program should take three command-line arguments as shown below:image The program image reads an existing PGM image, and outputs the image's two variations to files as given at command line (respectively). You need to provide error checking for command-line arguments, and an error in the number of arguments should supersede any errors from files that cannot be found. You may assume the input file is a PGM P2 image in a proper format without comments (lines starting with "#"), and the maximum grey value is 255.

p2)

You are given 9 pgm images, all showing nice sculpture... but also a curious visitor who happened to be around when the images were taken. Write a program that can "filter" out the visitor and produce a nice clean image of the structure and background only, without the person.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!