Question

In lectures we discussed how bitmap images are stored as a grid of pixel values. Each pixel has a colour value, and colour ca
encoding scheme. You can assume that a 16 bit integer value will be used to indicate the number of sequential pixels with the
0 0
Add a comment Improve this question Transcribed image text
Answer #1

a.

Color representation scheme - RGB - typically uses 24 bits (3 bytes) to represent the color of pixel with 8 bits each for Red, Green and Blue intensities.

1. Since the above image consists of 10 pixels and each pixel need 3 bytes of storage, hence total number of bytes needed to store given image in uncompressed format = 10*3 = 30 bytes

2. When RLE technique is used, then since all the 10 pixels have same color, hence total number of bits needed to represent image in RLE compressed format = Number of bits for color of pixel + number of bits needed to indicate number of sequential pixels = 24 + 16 = 40 bits = 5 bytes

3. Compression ratio = (size of image in compressed format)/(size of image in uncompressed format) = 30/5 = 6

b. Since there are 12 pixels here with each pixel needs 3 bytes to represent color of pixel.

1. Total number of bytes needed to store given image = 12*3 = 36 bytes

2. When RLE technique is used, then since there are 3 different sequence of colors and each sequence will need 24 bits to represent color of pixel and 16 bits for number of sequential pixels with same colors.

Hence total number of storage needed = 3*(24+16) = 120 bits = 15 bytes

3. Compression ratio = 36/15 = 2.4

Please comment for any clarification.

Add a comment
Know the answer?
Add Answer to:
In lectures we discussed how bitmap images are stored as a grid of pixel values. Each...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Python Project

    AssignmentBitmap files map three 8-bit (1-byte) color channels per pixel. A pixel is a light-emitting "dot" on your screen. Whenever you buy a new monitor, you will see the pixel configuration by its width and height, such as 1920 x 1080 (1080p) or 3840x2160 (4K). This tells us that we have 1080 rows (height), and each row has 1920 (width) pixels.The bitmap file format is fairly straight forward where we tell the file what our width and height are. When...

  • PLEASE CODE IN PYTHON Run-length encoding is a simple compression scheme best used when a data-set...

    PLEASE CODE IN PYTHON Run-length encoding is a simple compression scheme best used when a data-set consists primarily of numerous, long runs of repeated characters. For example, AAAAAAAAAA is a run of 10 A’s. We could encode this run using a notation like *A10, where the * is a special flag character that indicates a run, A is the symbol in the run, and 10 is the length of the run. As another example, the string KKKKKKKKKKKKKBCCDDDDDDDDDDDDDDDKKKKKMNUUUGGGGG would be encoded...

  • This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation...

    This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT