Question: (With C++ program) implement a function which takes a short integer std::array of 4096 elements as the argument. It is actually contains an image of

(With C++ program) implement a function which takes a short integer std::array of 4096 elements as the argument. It is actually contains an
image of 64x64 pixels, where the depth (0-255) of each pixel at position (row,col) can be calculated as:
 (With C++ program) implement a function which takes a short integer
std::array of 4096 elements as the argument. It is actually contains an

ASCII ART #2 Following previous exercise, implement a function which takes a short integer std::array of 4096 elements as the argument. It is actually contains an image of 64x64 pixels, where the depth (0-255) of each pixel at position (row.col) can be calculated as: ing(row*64+col] The function should convert the image into 64x32 characters (since a character occupied a rectangle space) and stored as a std:array of std::string based on an ASCII art representing of 8 depth levels again: level 7 - (a white space) level 6 = (a period) level 5 -':'(a colon) level 4 -+ (a plus) level 3 -' (an asterisk) level 2 - 6 (an ampersand) level 1 -# (a pound sign) level 0 - (a percet sign) As an example, if an input array containing 4x4 pixels are 151, 161, 164, 168, 166, 165, 159, 159, 160, 161, 163, 168, 162, 161, 162, 163, They should be jointed into 4(col)x2(row) pixels: 317,326,323,327, 322,322,325,331 And convert to depth level with a table like 0- 63 = level 0 = 64-127 - level 1 - 128-191 = level 2 - 'G' 192-255 - level 3 = 256-319 = level 4 ='+ 320-383 - Level 5! 384-447 = level 6 - 448-511 - Level 7 - Then return the resulting array of strings as +::: 1111 Language Mode C/C++ Your Code DOOGES 1 include ing) 5 6 std:: array<:string output start your code rei ind ar111 return submit>

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!