Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this problem, you will write a program ( filter . cc ) which performs some very simple image processing operations. You can find a
In this problem, you will write a program filtercc which performs some very simple image processing operations. You can find a template program in Moodle filtertemplate.cc The program, once compiled, can be run as follows:
filter image.pgm
where image.pgm is the file containing an image.
Write the allocate and deallocate functions see the template which allocates and deallocates twodimensional arrays of integers.
You will also write three functions which are used to process images in different ways:
a int averageint A;
This function computes the average rounded to the nearest integer of the two
dimensional array of integers.
b int medianint A;
This function computes the median of the twodimensional array of integers, rounded to the nearest integer. You may reuse code you have written for the previous problems.
c int strangeint A;
This function should return the value:
times Atimes A A Atimes A A
rounded to the nearest integer.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started