Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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:
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions