Answered You can hire a professional tutor to get the answer.

QUESTION

4 Crop Image (30 marks) 1. e920 Template: cropperusm You are given $1,y1,m2,y2, and a test.txt le. Read the data in testlixt into the specied buffer....

This needs to be done in MIPs and i can only do the read data portion

4 Crop Image (30 marks) 1. e920 Template: cropperusmYou are given $1,y1,m2,y2, and a test.txt file.Read the data in testlixt into the specified buffer. . Generate a new .pgm named cropped.me that contains a cropped version of the image infor- mation contained in test.tmt, i.e., reading it into an array and then cropping the rectangularportion bounded by $1,311, 332,342. . Make sure that the cropped.pgm has the correct header! Otherwise, the cropped image won’t be displayed properly. . Make sure to use P2 for "plain pgm" and 15 for the max intensity (last term from the header in part 1 b). This means the only values that change are those specifying the dimensions ofyour image. Therefore, the header must not be hard coded for this question. This extensionshould be added to your write function. TESTING: you can expect that all test.txt files that are tested will start with the same headeras part 1, and that x1,y1,x2,y2 will be valid inputs, i.e., they will be within the bounds ofthe original array.
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question