Question: A two dimensional array given below represents the pixel values of a greyscale image. Write a program to find the following from this array: a)

A two dimensional array given below represents the pixel values of a greyscale image. Write a program to find the following from this array: a) The maximum value in the array b) The minimum value in the array c) The total number of values greater than or equal to 128 in the array. d) The mean value of the array e) The standard deviation of the array int pixels_2d[5][6] = {{15, 18, 30, 200, 234, 37}, {12, 134, 128, 190, 111, 124}, {77, 177, 130, 35, 64, 120}, {123, 234, 228, 190, 211, 12}, {78, 77, 13, 35, 164, 220}}; [Hints: use nested loops (outer for loop to keep track of row number and inner for loop to keep track of column number). Initialize maximum value or minimum value to be equal to pixels_2d[0][0] to solve part a and part b of the problem]

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 Databases Questions!