SlideShare uma empresa Scribd logo
1 de 13
RUN LENGTH
 ENCODING

       Praseetha S Nair
         M.Tech(CS)
COMPRESSION


 Data compressed by eliminating redundant elements.

 Purpose of compression:-

  -save storage space

  -reduce communications capacity requirements

 Some code must be substituted for eliminated element.

 Based on this code receiver can reconstruct original
  data.
 Categories:-
  1.lossless compression
    -no information lost
    -decompressed data are identical to original
  uncompressed
     data
  2.lossy compression
    -decompressed data may be an
  approximation to the
     original uncompressed data
Null Suppression

 Oldest and simplest

 Long string of blanks , nulls etc cause
  redundancy.

 At transmitter:

  -scans data for string of blanks.

  -substitute two character code for any string

   that is encountered.
 Example :

  the string

      XYZbbbbbQRX

  is replaced by

      XYZSC5QRX

  where Sc is a special compression indication
  character

       b is symbol for a blank space
 At receiver:

  -scan incoming character for special indication

   character

  -reconstruct original data
Run-Length Encoding


 Compress any type of repeating data sequence

 At transmitter:

  -identify repeating characters to replace

  -if found, eliminate and replace by three- character code
Sc        X             Cc
            Sc-Special character indicating compression follows
            X-Any repeated data character
            Cc-Character count

                         (a) Compression format

Original data string           Encoded data string
$******55.72                   $c*655.72
---------                      Sc-9
                               GunsScb9Butter


                         (b)Examples

                    Fig: Run-Length Encoding
 Efficiency depends on

  -number of repeated character occurrences in data to be
  compressed

  -average repeated character length.

 Compression ratio=length of uncompressed data

                      length of compressed data

 Any compression scheme will have variable performance
  as the content of the input varies.
 It is used as an element in more complex
  image compression technique.

 For run-length encoding on an image,
  transmission of digital line scan is replaced
  by transmission of a quantity count of each of
  successive run of black or white scanned
  picture element.
0000000000
                                       0000000000
                                       0001111000
                                       0001001000
                                       0001111000
                                       0000001000
                                       0000001000
                                       0001111000
                                       0000000000
                                       0000000000
                                       Length:100 bit

                                       23W 4B 6W 1B 2W 1B
                                       6W 4B 9W 1B 9W 1B
                                       6W 4B 23W
(a)Image
                                       or:
Fig: Run-Length Code for a 100-pixel   23 4 6 1 6 4 9 1 916 4
image                                  23
                                       Length:15characters=1
                                       20bit
 Application of run length encoding to a 10X10
  image.

 10X10 representation is converted to a 100-
  bit code.

 Each pixel is represented by a single bit
  indicate black or white.

 Run-length code consist of length of alternate
  black or white sequence.

 Encoded data stream is a string of number
  that indicate length of alternate black or
  white runs.
THANK YOU

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Lzw
LzwLzw
Lzw
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Edge linking in image processing
Edge linking in image processingEdge linking in image processing
Edge linking in image processing
 
Bit plane coding
Bit plane codingBit plane coding
Bit plane coding
 
Jpeg standards
Jpeg   standardsJpeg   standards
Jpeg standards
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Fidelity criteria in image compression
Fidelity criteria in image compressionFidelity criteria in image compression
Fidelity criteria in image compression
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
 
Discrete cosine transform
Discrete cosine transform   Discrete cosine transform
Discrete cosine transform
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Image Representation & Descriptors
Image Representation & DescriptorsImage Representation & Descriptors
Image Representation & Descriptors
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Wiener Filter
Wiener FilterWiener Filter
Wiener Filter
 
Lzw compression
Lzw compressionLzw compression
Lzw compression
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentals
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
digital image processing
digital image processingdigital image processing
digital image processing
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Wavelet transform in image compression
Wavelet transform in image compressionWavelet transform in image compression
Wavelet transform in image compression
 

Semelhante a Run length encoding

Data compretion
Data compretionData compretion
Data compretionSajan Sahu
 
Encryption Quality Analysis and Security Evaluation of CAST-128 Algorithm and...
Encryption Quality Analysis and Security Evaluation of CAST-128 Algorithm and...Encryption Quality Analysis and Security Evaluation of CAST-128 Algorithm and...
Encryption Quality Analysis and Security Evaluation of CAST-128 Algorithm and...IJNSA Journal
 
When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)Shujun Li
 
Basics of ct lecture 2
Basics of ct  lecture 2Basics of ct  lecture 2
Basics of ct lecture 2Gamal Mahdaly
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.pptHarisMasood20
 
project ppt on anti counterfeiting technique for credit card transaction system
project ppt on anti counterfeiting technique for credit card transaction systemproject ppt on anti counterfeiting technique for credit card transaction system
project ppt on anti counterfeiting technique for credit card transaction systemRekha dudiya
 
2017 10-06 analogue and digital signals
2017 10-06 analogue and digital signals2017 10-06 analogue and digital signals
2017 10-06 analogue and digital signalsAigerim Kaimakova
 
Serial Digital Interface (SDI), From SD-SDI to 24G-SDI, Part 2
Serial Digital Interface (SDI), From SD-SDI to 24G-SDI, Part 2Serial Digital Interface (SDI), From SD-SDI to 24G-SDI, Part 2
Serial Digital Interface (SDI), From SD-SDI to 24G-SDI, Part 2Dr. Mohieddin Moradi
 
lossless data compression and decompression using simple byte coding
lossless data compression and decompression using simple byte codinglossless data compression and decompression using simple byte coding
lossless data compression and decompression using simple byte codingHarshini Thota
 
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 IJCER (www.ijceronline.com) International Journal of computational Engineeri... IJCER (www.ijceronline.com) International Journal of computational Engineeri...
IJCER (www.ijceronline.com) International Journal of computational Engineeri...ijceronline
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Joel P
 
DICOM structure
DICOM structureDICOM structure
DICOM structureShiju P K
 

Semelhante a Run length encoding (20)

Source coding
Source codingSource coding
Source coding
 
Data compretion
Data compretionData compretion
Data compretion
 
BCH Codes
BCH CodesBCH Codes
BCH Codes
 
Encryption Quality Analysis and Security Evaluation of CAST-128 Algorithm and...
Encryption Quality Analysis and Security Evaluation of CAST-128 Algorithm and...Encryption Quality Analysis and Security Evaluation of CAST-128 Algorithm and...
Encryption Quality Analysis and Security Evaluation of CAST-128 Algorithm and...
 
Compression ii
Compression iiCompression ii
Compression ii
 
When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)
 
Basics of ct lecture 2
Basics of ct  lecture 2Basics of ct  lecture 2
Basics of ct lecture 2
 
Image Compression, Introduction Data Compression/ Data compression, modelling...
Image Compression, Introduction Data Compression/ Data compression, modelling...Image Compression, Introduction Data Compression/ Data compression, modelling...
Image Compression, Introduction Data Compression/ Data compression, modelling...
 
Digital Communication Techniques
Digital Communication TechniquesDigital Communication Techniques
Digital Communication Techniques
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
 
project ppt on anti counterfeiting technique for credit card transaction system
project ppt on anti counterfeiting technique for credit card transaction systemproject ppt on anti counterfeiting technique for credit card transaction system
project ppt on anti counterfeiting technique for credit card transaction system
 
2017 10-06 analogue and digital signals
2017 10-06 analogue and digital signals2017 10-06 analogue and digital signals
2017 10-06 analogue and digital signals
 
Serial Digital Interface (SDI), From SD-SDI to 24G-SDI, Part 2
Serial Digital Interface (SDI), From SD-SDI to 24G-SDI, Part 2Serial Digital Interface (SDI), From SD-SDI to 24G-SDI, Part 2
Serial Digital Interface (SDI), From SD-SDI to 24G-SDI, Part 2
 
lossless data compression and decompression using simple byte coding
lossless data compression and decompression using simple byte codinglossless data compression and decompression using simple byte coding
lossless data compression and decompression using simple byte coding
 
Shereef_MP3_decoder
Shereef_MP3_decoderShereef_MP3_decoder
Shereef_MP3_decoder
 
B.tech_project_ppt.pptx
B.tech_project_ppt.pptxB.tech_project_ppt.pptx
B.tech_project_ppt.pptx
 
CPA_FinalProject_2015
CPA_FinalProject_2015CPA_FinalProject_2015
CPA_FinalProject_2015
 
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 IJCER (www.ijceronline.com) International Journal of computational Engineeri... IJCER (www.ijceronline.com) International Journal of computational Engineeri...
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)
 
DICOM structure
DICOM structureDICOM structure
DICOM structure
 

Último

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Último (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

Run length encoding

  • 1. RUN LENGTH ENCODING Praseetha S Nair M.Tech(CS)
  • 2. COMPRESSION  Data compressed by eliminating redundant elements.  Purpose of compression:- -save storage space -reduce communications capacity requirements  Some code must be substituted for eliminated element.  Based on this code receiver can reconstruct original data.
  • 3.  Categories:- 1.lossless compression -no information lost -decompressed data are identical to original uncompressed data 2.lossy compression -decompressed data may be an approximation to the original uncompressed data
  • 4. Null Suppression  Oldest and simplest  Long string of blanks , nulls etc cause redundancy.  At transmitter: -scans data for string of blanks. -substitute two character code for any string that is encountered.
  • 5.  Example : the string XYZbbbbbQRX is replaced by XYZSC5QRX where Sc is a special compression indication character b is symbol for a blank space
  • 6.  At receiver: -scan incoming character for special indication character -reconstruct original data
  • 7. Run-Length Encoding  Compress any type of repeating data sequence  At transmitter: -identify repeating characters to replace -if found, eliminate and replace by three- character code
  • 8. Sc X Cc Sc-Special character indicating compression follows X-Any repeated data character Cc-Character count (a) Compression format Original data string Encoded data string $******55.72 $c*655.72 --------- Sc-9 GunsScb9Butter (b)Examples Fig: Run-Length Encoding
  • 9.  Efficiency depends on -number of repeated character occurrences in data to be compressed -average repeated character length.  Compression ratio=length of uncompressed data length of compressed data  Any compression scheme will have variable performance as the content of the input varies.
  • 10.  It is used as an element in more complex image compression technique.  For run-length encoding on an image, transmission of digital line scan is replaced by transmission of a quantity count of each of successive run of black or white scanned picture element.
  • 11. 0000000000 0000000000 0001111000 0001001000 0001111000 0000001000 0000001000 0001111000 0000000000 0000000000 Length:100 bit 23W 4B 6W 1B 2W 1B 6W 4B 9W 1B 9W 1B 6W 4B 23W (a)Image or: Fig: Run-Length Code for a 100-pixel 23 4 6 1 6 4 9 1 916 4 image 23 Length:15characters=1 20bit
  • 12.  Application of run length encoding to a 10X10 image.  10X10 representation is converted to a 100- bit code.  Each pixel is represented by a single bit indicate black or white.  Run-length code consist of length of alternate black or white sequence.  Encoded data stream is a string of number that indicate length of alternate black or white runs.