Problem Description: In order to transmit data across a cable, a sender transmits a series of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Problem Description: In order to transmit data across a cable, a sender transmits a series of high and low voltages which a receiver may interpret as 1 s and 0 s . This may be further abstracted by dividing the stream into discrete chunks, then calling these chunks a representation of something (like letters, numbers, frequencies, amplitudes, etc.). One of the most familiar examples of this is video signals, where each pixel P in a frame is transmitted one after another along the wire. SENDER -> PN -> P…..j -> P3 -> P₂ -> P₁ -> P₁ -> RECEIVER But if the pixels are all lined up, how are they interpreted as an image? In one strategy, the display merely places the pixels as one might place letters when writing a book, from the top left, in horizontal lines, to the bottom right. Each row is referred to as a scanline , and the display is specified by the width and height in pixels. Currently, a high quality display (colloquially termed 4K ) might have a resolution up to 3840 x 2160 (width x height). This is sometimes also called 2160p , or 2160 line resolution. Task 1/3 (Question 2: Video Streams): Assuming a 52 x 27 (width x height) display and a transmission schema as described above, parse the following signal stream representing one frame of the display: -/XMMMM:: MMMMMMMM- MX- MMMX:X::- :/X:MMnnM: MMMMMMn-- --!nMMMM:- --MMMMMMÑMMMMMMMMMMMMMMMX: : : - !nMMMMMM!!! --MMMMMMX::: MMMMMMMMMMMMMnM--:- ----!nMMMMMMMMMMMnXMMnMX: MMMn! XnnMn! ---- -/XXMMn!- MMn!! !! MMMMMMMMMMMMMMMMMMMMM ! - Your result will be a form of ASCII art. -! !nMMMMMMMMMMM!! ----/XnMM! MMMMM: -!!!! MMMMMX- -MMMMMMMMMMMMMMMMMMM:::: --MMMMMMMMMMMMMMMMMMMMM: ---- -nMMMMX: -- ! MMMMMMMMXMXnnnMMMMMMMMMM! -/::X:M! n-:- -:!!nn: XIM --: - ! MMM -MMMMMMMMMM -MMMMMMXMMMMMMMMMMM nnnXnnnXXn! --- - ! nMMMMMMXMXXMMXnnMXXnnnnX - !nMMMMMMMMMMMMMMMM!! Task 2/3 (Question 2: Video Streams): However, while accurate from a hardware perspective, representing an image as a stream is less intuitive to humans (we like our Cartesian coordinates). Write a program to pack the first scanline (52 characters) into an array of size 52, then print that scanline back to console. ./main -/XMMMM:: Fig. 2.3-Sample code execution Task 3/3 (Question 2: Video Streams): Finally, modify your code from part 2 to process and represent the whole image. For an extra challenge, rotate the output 90 degrees clockwise. ./main ‒‒‒‒‒‒/XMMMM:: -/XnMM! MMMMM: /X:MMnnM: MMMMMMn- [...] -/::X:M! -/XXMMn! !!! Problem Description: In order to transmit data across a cable, a sender transmits a series of high and low voltages which a receiver may interpret as 1 s and 0 s . This may be further abstracted by dividing the stream into discrete chunks, then calling these chunks a representation of something (like letters, numbers, frequencies, amplitudes, etc.). One of the most familiar examples of this is video signals, where each pixel P in a frame is transmitted one after another along the wire. SENDER -> PN -> P…..j -> P3 -> P₂ -> P₁ -> P₁ -> RECEIVER But if the pixels are all lined up, how are they interpreted as an image? In one strategy, the display merely places the pixels as one might place letters when writing a book, from the top left, in horizontal lines, to the bottom right. Each row is referred to as a scanline , and the display is specified by the width and height in pixels. Currently, a high quality display (colloquially termed 4K ) might have a resolution up to 3840 x 2160 (width x height). This is sometimes also called 2160p , or 2160 line resolution. Task 1/3 (Question 2: Video Streams): Assuming a 52 x 27 (width x height) display and a transmission schema as described above, parse the following signal stream representing one frame of the display: -/XMMMM:: MMMMMMMM- MX- MMMX:X::- :/X:MMnnM: MMMMMMn-- --!nMMMM:- --MMMMMMÑMMMMMMMMMMMMMMMX: : : - !nMMMMMM!!! --MMMMMMX::: MMMMMMMMMMMMMnM--:- ----!nMMMMMMMMMMMnXMMnMX: MMMn! XnnMn! ---- -/XXMMn!- MMn!! !! MMMMMMMMMMMMMMMMMMMMM ! - Your result will be a form of ASCII art. -! !nMMMMMMMMMMM!! ----/XnMM! MMMMM: -!!!! MMMMMX- -MMMMMMMMMMMMMMMMMMM:::: --MMMMMMMMMMMMMMMMMMMMM: ---- -nMMMMX: -- ! MMMMMMMMXMXnnnMMMMMMMMMM! -/::X:M! n-:- -:!!nn: XIM --: - ! MMM -MMMMMMMMMM -MMMMMMXMMMMMMMMMMM nnnXnnnXXn! --- - ! nMMMMMMXMXXMMXnnMXXnnnnX - !nMMMMMMMMMMMMMMMM!! Task 2/3 (Question 2: Video Streams): However, while accurate from a hardware perspective, representing an image as a stream is less intuitive to humans (we like our Cartesian coordinates). Write a program to pack the first scanline (52 characters) into an array of size 52, then print that scanline back to console. ./main -/XMMMM:: Fig. 2.3-Sample code execution Task 3/3 (Question 2: Video Streams): Finally, modify your code from part 2 to process and represent the whole image. For an extra challenge, rotate the output 90 degrees clockwise. ./main ‒‒‒‒‒‒/XMMMM:: -/XnMM! MMMMM: /X:MMnnM: MMMMMMn- [...] -/::X:M! -/XXMMn! !!!
Expert Answer:
Answer rating: 100% (QA)
Answer To interpret the pixels transmitted in a series as an image on a display ... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
(4) (25%) In order to transmit a message to a receiver, the sender consumes energy Enx(d) = c d J/bit, where d is the Euclidean distance between the sender and the receiver, c is a constant, and a is...
-
An incomplete subsidiary ledger of wire cable for May is as follows: a. Complete the materials issuances and balances for the wire cable subsidiary ledger under FIFO.b. Determine the balance of wire...
-
An incomplete subsidiary ledger of wire cable for May is as follows: a. Complete the materials issuances and balances for the wire cable subsidiary ledger.b. Determine the balance of wire cable at...
-
In what respects did certain employees regard the University of Baths culture under Breakwell as falling short of the aspirations described in the 2016-21 strategic plan?
-
Ray Corporation, a small manufacturing firm, wants to establish a pension fund for its 10 employees who range from 28 to 51 years of age. Ray wants each employee who retires from the firm at age 65...
-
An ex-Google coder makes twice as much freelancing James Knight quit a well-paid job writing software for Google to go freelance and is now earning about double his Google pay as a freelancer. In a...
-
A mixing basin in a sewage filtration plant is stirred by a mechanical agitator with a power input \(\dot{W} \doteq F \cdot L / T\). Other parameters describing the performance of the mixing process...
-
Congratulations! You have just won a $40 million lottery and have elected to receive $2 million per year for 20 years. Assume that a 4 percent interest rate is used to evaluate the annuity and that...
-
Suppose that the Forward price of the ABC stock is 100. A call option on ABC with exercise price 100 is trading at $24 and a put option with the same exercise price is trading at $18. All are with...
-
The Booth Companys sales are forecasted to increase from $1,000 in 2007 to $2,000 in 2008. Here is the December 31, 2007, balance sheet: Booths fixed assets were used to only 50% of capacity during...
-
Sunlux Group is a divsionalised company that has divisions in other countries but headquartered in Namibia. Due to the divisionalised nature of Sunlux, performance measurement is of crucial...
-
Think of a business, leisure or pastime activity in which you may be involved at the moment. Using the tips you have picked up in this chapter, construct a Web based business idea for that sector,...
-
Give three reasons why a clothing company should consider distributing direct rather than through retail.
-
Write a brief for a mobile app. Identify its purpose and target audience. Support your proposal with research evidence.
-
While the attendences of international one-day and test-match fixtures was as high as ever, the ordinary county cricket scene in England was not well supported. The profile of cricket followers was...
-
At a recent strategic planning retreat of a 40-person multispecialty group, the administrator made a presentation that focused on the coming year's plans to establish the organization's first two...
-
For buy-sell purposes, all of the following represent acceptable methods by which to value the business except: :a) Goodwill method. b) Book value. c) Formula approach. d) Capitalization of expenses
-
Write the given system without the use of matrices. D) - ()- d (x sin t + 8 (2+ 1)
-
Abeam of protons is accelerated to a speed of 5.0 x 106 m/s in a particle accelerator and emerges horizontally from the accelerator into a uniform magnetic field. What magnetic field (give its...
-
The atomic mass of 23692U is 235.043 925 u. Find the average binding energy per nucleon for this isotope.
-
A photon can undergo Compton scattering from either an electron or a neutron. How does the maximum wave-length shift for Compton scattering from a neutron com-pare with that from an electron? Explain.
-
On May 8, 1984, Hannah Motsi graduated from Louisiana State University. She set to work opening a coffee shop in Baton Rouge called HannaH and found a perfect location in a new development. Using a...
-
How does the firms WACC (with taxes) change with leverage?
-
Assume that Microsoft has no debt, a total market value of $2 trillion, and a marginal tax rate of 21%. If it permanently changes its leverage from no debt by taking on new debt in the amount of 13%...
Study smarter with the SolutionInn App