Unfortunately errors in transmission sometimes occur thus


Problem

The Galileo spacecraft sends photos taken in space back to Earth as a stream of numbers. Your job is to take a matrix (two-dimensional array) of the numbers and print it as a negative picture. If the numbers received represent levels of brightness, then one approach to generating a picture is to print a dark character (such as $) when the brightness level is low and print a light character (such as a blank or a period) when the level is high. Unfortunately, errors in transmission sometimes occur. Thus, your program should first attempt to find and correct these errors. Assume that a value is in error if it differs by more than one from each of its four neighboring values. Correct the erroneous value by giving it the average of its neighboring values, rounding it to the nearest integer.

Note that values on the corners or boundaries of the matrix have to be processed differently from the values on the interior. Your program should print a negative image of the corrected picture on a new page.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Unfortunately errors in transmission sometimes occur thus
Reference No:- TGS02652885

Expected delivery within 24 Hours