0% found this document useful (0 votes)
65 views2 pages

Signal Compression Assignment: Arjun.P B100155EC

The document discusses image compression using Huffman coding. It involves counting pixel colors and assigning shorter codes to more frequent colors. The process includes converting the image to grayscale, finding unique pixel values, calculating probabilities, arranging probabilities in descending order, merging lower probabilities until two are left, assigning codes based on probability, performing Huffman encoding to map codes to symbols, and reconstructing the original image through Huffman decoding.

Uploaded by

arjunp20
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views2 pages

Signal Compression Assignment: Arjun.P B100155EC

The document discusses image compression using Huffman coding. It involves counting pixel colors and assigning shorter codes to more frequent colors. The process includes converting the image to grayscale, finding unique pixel values, calculating probabilities, arranging probabilities in descending order, merging lower probabilities until two are left, assigning codes based on probability, performing Huffman encoding to map codes to symbols, and reconstructing the original image through Huffman decoding.

Uploaded by

arjunp20
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SIGNAL COMPRESSION ASSIGNMENT

ARJUN.P B100155EC

IMAGE COMPRESSION The objective of image compression is to reduce irrelevance and redundancy of the image data in order to be able to store or transmit data in an efficient form. One data compression strategy to reduce the number of bits needed to represent the image is to use short strings to encode colors that occur frequently and longer strings for colors that are occur less frequently.Here we have to count the no of pixels in each colour for doing image compression. Huffman coding is a recursive procedure to build a prefx-free variable length code with shortest average length . It works as follows Start by writing down all the colors, together with their probabilities or the number of times they occur, in increasing numerical order.

Step1- Read the image on to the workspace of the mat lab Step2- Convert the given colour image into grey level image. Step3- Call a function which will find the symbols (i.e. pixel value which is nonrepeated). Step4- Call a function which will calculate the probability of each symbol. Step5- Probability of symbols are arranged in decreasing order and lower probabilities are merged and this step is continued until only two probabilities are left and codes are assigned according to rule that :the highest probable symbol will have a shorter length code. Step6- Further Huffman encoding is performed i.e. mapping of the code words to the corresponding symbols will result in a compressed data. Step7- The original image is reconstructed i.e. decompression is done by using Huffman decoding. Step8- Generate a tree equivalent to the encoding tree. Step9- Read input character wise and left to the table II until last element is reached in the table II. Step10-Output the character encode in the leaf and return to the root, and continue the step9 until all the codes of corresponding symbols are known.

You might also like