Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 1 Day Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Management Posted 03 Feb 2018 My Price 8.00

averages of the values

Write a static method blur(double[][]picture) that you could use on a part of a picture file to obscure a detail such as a person’s face or a license plate number. This method computes the weighted averages of the values in picture and returns them in a new two-dimensional array. To find a weighted average of a group of number, you count some of them more than others. Thus, you multiply each item by its weight, add these products together, and divide the result by the sum of the weights.

For each element in picture, complete the weighted average of the elements and its immediate neighbor. Store the result in a new two-dimensional array in the same position that the element occupies in picture. This new array is the one the method return.

The neighbor of an element in picture can be above, below, to the left of, and to the right of it, either vertically, horizontally, or, diagonally. So each weighted average in the new array picture. A corner value will use only values: itself and three neighbour. An edge will use only six values: itself and eight neighbours. So you will need to treat the corner and edges separately from the other cell.

The weight to use are:

1     2     1

2     4     2

1     2     1

The element is self has the highest weight of 4, the horizontal and vertical neighbor have a weight of 2, and the diagonal neighbor have a weight of 1. For example, suppose the value in picture are

 And the new array is called result. In assigning weights, we will arbitrarily start with an element and consider neighbor in clockwise direction.

Thus, the value in result [1] [1] is equal to

To arrive at this equation, we started with the element at picture [1] [1] and then, beginning with the neighbor to the right, we considered neighbor in a clockwise direction. The corner value in result [0] [0] is equal to

Note that picture [0][0] has fewer neighbors than an interior value such as picture[1][1]. The same is true for an edge value such as picture [0][1].

Thus, the edge value in result [0] [0] is equal to

The final array, result, would be

 

Answers

(5)
Status NEW Posted 03 Feb 2018 07:02 PM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on-----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be-----------

Not Rated(0)