SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Algorithmen zum Verkleinern von digitalen Videos



                 Wolfgang Effelsberg
                Praktische Informatik IV
                 Universität Mannheim
                       Germany
Content

1. Motivation
2. Scaling und Cropping
3. Seam Carving for Still Images
4. An Improvement for Diagonal Lines
5. Seam Carving for Video
6. Conclusion and Outlook




Algorithmen zum Verkleinern                          Klagenfurt
                              Wolfgang Effelsberg                   2
    von digitalen Videos                            23. Juli 2012
1. Motivation

• Mobile devices (smart phones, pad computers) are getting very popular for
  showing videos.
• The representation of still images and videos on those devices requires an
  adaptation to the screen size and the aspect ratio.
• Scaling and Cropping are easy to implement but they do not work very
  well.
• Seam Carving is a promising technology for still images and videos.




 Algorithmen zum Verkleinern                          Klagenfurt
                               Wolfgang Effelsberg                   3
     von digitalen Videos                            23. Juli 2012
2. Scaling and Cropping

Scaling
Scaling reduces the image linearly, without looking at its content.
„Letterboxing“ is used if the format does not fit on the screen.

Example:




 Algorithmen zum Verkleinern                          Klagenfurt
                               Wolfgang Effelsberg                    4
     von digitalen Videos                            23. Juli 2012
Cropping
Cropping cuts the image parallel to the edges until the final format is reached,
without looking at the image content. Parts of the image can get lost.

Example:




 Algorithmen zum Verkleinern                          Klagenfurt
                               Wolfgang Effelsberg                           5
     von digitalen Videos                            23. Juli 2012
3. Seam Carving for Still Images

Removing of specific pixels from the image, based on the importance of the
content
Based on an „energy function“ describing the importance of different parts of the
content




 Algorithmen zum Verkleinern                          Klagenfurt
                               Wolfgang Effelsberg                         6
     von digitalen Videos                            23. Juli 2012
Example

Reduce the width by 40 %
Energy is maximal on edge pixels in the image.




                           original image                               energy image



 Algorithmen zum Verkleinern                             Klagenfurt
                                  Wolfgang Effelsberg                                  7
     von digitalen Videos                               23. Juli 2012
Naive Approach

Remove from each line the pixels with minimal energy




                        original image                                 200 pixels removed


 Algorithmen zum Verkleinern                            Klagenfurt
                                 Wolfgang Effelsberg                                 8
     von digitalen Videos                              23. Juli 2012
Remove Entire Columns

Remove the 200 columns with the smallest energy




                               original image                           200 columns with minimal
                                                                            energy removed

 Algorithmen zum Verkleinern                             Klagenfurt
                                  Wolfgang Effelsberg                                     9
     von digitalen Videos                               23. Juli 2012
Definition of a Seam

• A vertical seam is an 8-connected path of pixels, running from the top to the bottom
  of the image and containing exactly one pixel per row.
• Horizontal seams are defined analogously.




 Algorithmen zum Verkleinern                          Klagenfurt
                               Wolfgang Effelsberg                         10
     von digitalen Videos                            23. Juli 2012
Advantage of Seams

Can be adapted better to the regions of interest (regions of high energy)




 Algorithmen zum Verkleinern                          Klagenfurt
                               Wolfgang Effelsberg                          11
     von digitalen Videos                            23. Juli 2012
Seams for our Example

200 vertical seams with minimal energy removed




                               original image                            200 vertical seams removed



 Algorithmen zum Verkleinern                              Klagenfurt
                                   Wolfgang Effelsberg                                    12
     von digitalen Videos                                23. Juli 2012
Our Other Example




It os obvious that seam carving removes unimportant content first.




Algorithmen zum Verkleinern                          Klagenfurt
                              Wolfgang Effelsberg                    13
    von digitalen Videos                            23. Juli 2012
Energy Functions (1)

A simple energy function based on the difference in light intensity between two pixels


                                    δ               δ
                 e( I ( x, y )) =      I ( x, y ) +    I ( x, y )
                                    δx              δy

Better (but more complicated) energy functions are possible, for example, based on
important objects found in the image.




 Algorithmen zum Verkleinern                              Klagenfurt
                               Wolfgang Effelsberg                          14
     von digitalen Videos                                23. Juli 2012
Energy Functions (2)

We use saliency and face recognition to identify regions of interest


                                                                                   δ               δ
 esal + face ( x, y ) = ws ⋅ saliency ( x, y ) + w f ⋅ face( x, y ) +                 I ( x, y ) +    I ( x, y )
                                                                                   δx              δy




 original image                saliency map                 face map            seams with esal+face      new
                                                                                as energy function       image




 Algorithmen zum Verkleinern                                            Klagenfurt
                                      Wolfgang Effelsberg                                               15
     von digitalen Videos                                              23. Juli 2012
4. An Improvement for Diagonal Lines

A problem with traditional seam carving: diagonal lines




                    original image                         width reduced to 40% by
                                                                 seam carving




Algorithmen zum Verkleinern                                       Klagenfurt
                                     Wolfgang Effelsberg                             16
    von digitalen Videos                                         23. Juli 2012
The Problem with Diagonal Lines (1)

When a seam crosses a diagonal line visible artefacts appear.




              a diagonal line          seams cutting that line              seams removed




 Algorithmen zum Verkleinern                                      Klagenfurt
                                Wolfgang Effelsberg                                         17
     von digitalen Videos                                        23. Juli 2012
The Problem with Diagonal Lines (2)

Especially critical if several seams cross the line at the same place.
Idea: distribute the seams more evenly over the line.




      Neigboring seams           line after removing   distribute seams evenly   line after removing
        cutting a line                the seams                                       the seams




Algorithmen zum Verkleinern                                 Klagenfurt
                              Wolfgang Effelsberg                                      18
    von digitalen Videos                                   23. Juli 2012
Solution for Diagonal Lines (1)

Solution: modify the energy function between the computation of the seams: increase
the energy at intersection points




    seam cutting a line         modified energy      energy function     third seam
                               function and new      modified again
                                     seam




 Algorithmen zum Verkleinern                              Klagenfurt
                               Wolfgang Effelsberg                              19
     von digitalen Videos                                23. Juli 2012
Solution for Diagonal Lines (2)

Result




                   original image                     traditional seam carving   improved seam carving




Algorithmen zum Verkleinern                                      Klagenfurt
                                Wolfgang Effelsberg                                         20
    von digitalen Videos                                        23. Juli 2012
5. Seam Carving for Video
First idea: apply seam carving for each frame separately
 the video gets shaky.




                               original video                           seam carved for each frame separately


 Algorithmen zum Verkleinern                                  Klagenfurt
                                       Wolfgang Effelsberg                                     21
     von digitalen Videos                                    23. Juli 2012
Seam Carving for Video: First Idea
The video frames define a 3D block over time.
We remove 2D “seam surfaces”. The seam pixels of one surface are connected in
the third dimension.
We use a graph algorithm (min-cut max-flow) to discover optimal “seam surfaces”.
Problem: takes considerable time to compute.




                                time


 Algorithmen zum Verkleinern                          Klagenfurt
                               Wolfgang Effelsberg                       22
     von digitalen Videos                            23. Juli 2012
Seam Carving for Videos: Second Idea

Fast seam carving for video
• Accumulate all energy values of all frames in the first frame.
• Compute the optimal seams there.
• Map those seams back to the block of frames.




 Algorithmen zum Verkleinern                          Klagenfurt
                               Wolfgang Effelsberg                   23
     von digitalen Videos                            23. Juli 2012
Example for the Second Idea




               seams carved separately                      fast seam carving
                   for each frame



Algorithmen zum Verkleinern                          Klagenfurt
                              Wolfgang Effelsberg                               24
    von digitalen Videos                            23. Juli 2012
Another Example




                     scaling                                         fast seam carving




Algorithmen zum Verkleinern                           Klagenfurt
                               Wolfgang Effelsberg                                   25
    von digitalen Videos                             23. Juli 2012
6. Conclusions and Outlook

• Seam Carving is a useful technique to reduce image sizes without losing
  relevant content.
• Finding a good energy function is a real challenge.
• Improvements are possible for diagonal lines.
• Flicker removal is of critical importance for videos. Fast Seam Carving is
  a useful algorithm for that problem.
• Seam carving does not work well if most of the content is relevant for the
  viewer.
• Seam Carving can be combined with other techniques to create pleasant
  smal-screen versions of video.




 Algorithmen zum Verkleinern                          Klagenfurt
                               Wolfgang Effelsberg                   26
     von digitalen Videos                            23. Juli 2012
Vielen Dank …


                                     … für Ihre Aufmerksamkeit!

                                       Meine Mailadresse ist
                              effelsberg@informatik.uni-mannheim.de




Algorithmen zum Verkleinern                              Klagenfurt
                                  Wolfgang Effelsberg                   27
    von digitalen Videos                                23. Juli 2012

Weitere ähnliche Inhalte

Mehr von Förderverein Technische Fakultät

The Digital Transformation of Education: A Hyper-Disruptive Era through Block...
The Digital Transformation of Education: A Hyper-Disruptive Era through Block...The Digital Transformation of Education: A Hyper-Disruptive Era through Block...
The Digital Transformation of Education: A Hyper-Disruptive Era through Block...Förderverein Technische Fakultät
 
Engineering Serverless Workflow Applications in Federated FaaS.pdf
Engineering Serverless Workflow Applications in Federated FaaS.pdfEngineering Serverless Workflow Applications in Federated FaaS.pdf
Engineering Serverless Workflow Applications in Federated FaaS.pdfFörderverein Technische Fakultät
 
The Role of Machine Learning in Fluid Network Control and Data Planes.pdf
The Role of Machine Learning in Fluid Network Control and Data Planes.pdfThe Role of Machine Learning in Fluid Network Control and Data Planes.pdf
The Role of Machine Learning in Fluid Network Control and Data Planes.pdfFörderverein Technische Fakultät
 
Nonequilibrium Network Dynamics_Inference, Fluctuation-Respones & Tipping Poi...
Nonequilibrium Network Dynamics_Inference, Fluctuation-Respones & Tipping Poi...Nonequilibrium Network Dynamics_Inference, Fluctuation-Respones & Tipping Poi...
Nonequilibrium Network Dynamics_Inference, Fluctuation-Respones & Tipping Poi...Förderverein Technische Fakultät
 
East-west oriented photovoltaic power systems: model, benefits and technical ...
East-west oriented photovoltaic power systems: model, benefits and technical ...East-west oriented photovoltaic power systems: model, benefits and technical ...
East-west oriented photovoltaic power systems: model, benefits and technical ...Förderverein Technische Fakultät
 
Advances in Visual Quality Restoration with Generative Adversarial Networks
Advances in Visual Quality Restoration with Generative Adversarial NetworksAdvances in Visual Quality Restoration with Generative Adversarial Networks
Advances in Visual Quality Restoration with Generative Adversarial NetworksFörderverein Technische Fakultät
 
Industriepraktikum_ Unterstützung bei Projekten in der Automatisierung.pdf
Industriepraktikum_ Unterstützung bei Projekten in der Automatisierung.pdfIndustriepraktikum_ Unterstützung bei Projekten in der Automatisierung.pdf
Industriepraktikum_ Unterstützung bei Projekten in der Automatisierung.pdfFörderverein Technische Fakultät
 

Mehr von Förderverein Technische Fakultät (20)

Supervisory control of business processes
Supervisory control of business processesSupervisory control of business processes
Supervisory control of business processes
 
The Digital Transformation of Education: A Hyper-Disruptive Era through Block...
The Digital Transformation of Education: A Hyper-Disruptive Era through Block...The Digital Transformation of Education: A Hyper-Disruptive Era through Block...
The Digital Transformation of Education: A Hyper-Disruptive Era through Block...
 
A Game of Chess is Like a Swordfight.pdf
A Game of Chess is Like a Swordfight.pdfA Game of Chess is Like a Swordfight.pdf
A Game of Chess is Like a Swordfight.pdf
 
From Mind to Meta.pdf
From Mind to Meta.pdfFrom Mind to Meta.pdf
From Mind to Meta.pdf
 
Miniatures Design for Tabletop Games.pdf
Miniatures Design for Tabletop Games.pdfMiniatures Design for Tabletop Games.pdf
Miniatures Design for Tabletop Games.pdf
 
Distributed Systems in the Post-Moore Era.pptx
Distributed Systems in the Post-Moore Era.pptxDistributed Systems in the Post-Moore Era.pptx
Distributed Systems in the Post-Moore Era.pptx
 
Don't Treat the Symptom, Find the Cause!.pptx
Don't Treat the Symptom, Find the Cause!.pptxDon't Treat the Symptom, Find the Cause!.pptx
Don't Treat the Symptom, Find the Cause!.pptx
 
Engineering Serverless Workflow Applications in Federated FaaS.pdf
Engineering Serverless Workflow Applications in Federated FaaS.pdfEngineering Serverless Workflow Applications in Federated FaaS.pdf
Engineering Serverless Workflow Applications in Federated FaaS.pdf
 
The Role of Machine Learning in Fluid Network Control and Data Planes.pdf
The Role of Machine Learning in Fluid Network Control and Data Planes.pdfThe Role of Machine Learning in Fluid Network Control and Data Planes.pdf
The Role of Machine Learning in Fluid Network Control and Data Planes.pdf
 
Nonequilibrium Network Dynamics_Inference, Fluctuation-Respones & Tipping Poi...
Nonequilibrium Network Dynamics_Inference, Fluctuation-Respones & Tipping Poi...Nonequilibrium Network Dynamics_Inference, Fluctuation-Respones & Tipping Poi...
Nonequilibrium Network Dynamics_Inference, Fluctuation-Respones & Tipping Poi...
 
Towards a data driven identification of teaching patterns.pdf
Towards a data driven identification of teaching patterns.pdfTowards a data driven identification of teaching patterns.pdf
Towards a data driven identification of teaching patterns.pdf
 
Förderverein Technische Fakultät.pptx
Förderverein Technische Fakultät.pptxFörderverein Technische Fakultät.pptx
Förderverein Technische Fakultät.pptx
 
The Computing Continuum.pdf
The Computing Continuum.pdfThe Computing Continuum.pdf
The Computing Continuum.pdf
 
East-west oriented photovoltaic power systems: model, benefits and technical ...
East-west oriented photovoltaic power systems: model, benefits and technical ...East-west oriented photovoltaic power systems: model, benefits and technical ...
East-west oriented photovoltaic power systems: model, benefits and technical ...
 
Machine Learning in Finance via Randomization
Machine Learning in Finance via RandomizationMachine Learning in Finance via Randomization
Machine Learning in Finance via Randomization
 
IT does not stop
IT does not stopIT does not stop
IT does not stop
 
Advances in Visual Quality Restoration with Generative Adversarial Networks
Advances in Visual Quality Restoration with Generative Adversarial NetworksAdvances in Visual Quality Restoration with Generative Adversarial Networks
Advances in Visual Quality Restoration with Generative Adversarial Networks
 
Recent Trends in Personalization at Netflix
Recent Trends in Personalization at NetflixRecent Trends in Personalization at Netflix
Recent Trends in Personalization at Netflix
 
Industriepraktikum_ Unterstützung bei Projekten in der Automatisierung.pdf
Industriepraktikum_ Unterstützung bei Projekten in der Automatisierung.pdfIndustriepraktikum_ Unterstützung bei Projekten in der Automatisierung.pdf
Industriepraktikum_ Unterstützung bei Projekten in der Automatisierung.pdf
 
Introduction to 5G from radio perspective
Introduction to 5G from radio perspectiveIntroduction to 5G from radio perspective
Introduction to 5G from radio perspective
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Algorithmen zum Verkleinern von digitalen Videos

  • 1. Algorithmen zum Verkleinern von digitalen Videos Wolfgang Effelsberg Praktische Informatik IV Universität Mannheim Germany
  • 2. Content 1. Motivation 2. Scaling und Cropping 3. Seam Carving for Still Images 4. An Improvement for Diagonal Lines 5. Seam Carving for Video 6. Conclusion and Outlook Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 2 von digitalen Videos 23. Juli 2012
  • 3. 1. Motivation • Mobile devices (smart phones, pad computers) are getting very popular for showing videos. • The representation of still images and videos on those devices requires an adaptation to the screen size and the aspect ratio. • Scaling and Cropping are easy to implement but they do not work very well. • Seam Carving is a promising technology for still images and videos. Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 3 von digitalen Videos 23. Juli 2012
  • 4. 2. Scaling and Cropping Scaling Scaling reduces the image linearly, without looking at its content. „Letterboxing“ is used if the format does not fit on the screen. Example: Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 4 von digitalen Videos 23. Juli 2012
  • 5. Cropping Cropping cuts the image parallel to the edges until the final format is reached, without looking at the image content. Parts of the image can get lost. Example: Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 5 von digitalen Videos 23. Juli 2012
  • 6. 3. Seam Carving for Still Images Removing of specific pixels from the image, based on the importance of the content Based on an „energy function“ describing the importance of different parts of the content Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 6 von digitalen Videos 23. Juli 2012
  • 7. Example Reduce the width by 40 % Energy is maximal on edge pixels in the image. original image energy image Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 7 von digitalen Videos 23. Juli 2012
  • 8. Naive Approach Remove from each line the pixels with minimal energy original image 200 pixels removed Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 8 von digitalen Videos 23. Juli 2012
  • 9. Remove Entire Columns Remove the 200 columns with the smallest energy original image 200 columns with minimal energy removed Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 9 von digitalen Videos 23. Juli 2012
  • 10. Definition of a Seam • A vertical seam is an 8-connected path of pixels, running from the top to the bottom of the image and containing exactly one pixel per row. • Horizontal seams are defined analogously. Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 10 von digitalen Videos 23. Juli 2012
  • 11. Advantage of Seams Can be adapted better to the regions of interest (regions of high energy) Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 11 von digitalen Videos 23. Juli 2012
  • 12. Seams for our Example 200 vertical seams with minimal energy removed original image 200 vertical seams removed Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 12 von digitalen Videos 23. Juli 2012
  • 13. Our Other Example It os obvious that seam carving removes unimportant content first. Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 13 von digitalen Videos 23. Juli 2012
  • 14. Energy Functions (1) A simple energy function based on the difference in light intensity between two pixels δ δ e( I ( x, y )) = I ( x, y ) + I ( x, y ) δx δy Better (but more complicated) energy functions are possible, for example, based on important objects found in the image. Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 14 von digitalen Videos 23. Juli 2012
  • 15. Energy Functions (2) We use saliency and face recognition to identify regions of interest δ δ esal + face ( x, y ) = ws ⋅ saliency ( x, y ) + w f ⋅ face( x, y ) + I ( x, y ) + I ( x, y ) δx δy original image saliency map face map seams with esal+face new as energy function image Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 15 von digitalen Videos 23. Juli 2012
  • 16. 4. An Improvement for Diagonal Lines A problem with traditional seam carving: diagonal lines original image width reduced to 40% by seam carving Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 16 von digitalen Videos 23. Juli 2012
  • 17. The Problem with Diagonal Lines (1) When a seam crosses a diagonal line visible artefacts appear. a diagonal line seams cutting that line seams removed Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 17 von digitalen Videos 23. Juli 2012
  • 18. The Problem with Diagonal Lines (2) Especially critical if several seams cross the line at the same place. Idea: distribute the seams more evenly over the line. Neigboring seams line after removing distribute seams evenly line after removing cutting a line the seams the seams Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 18 von digitalen Videos 23. Juli 2012
  • 19. Solution for Diagonal Lines (1) Solution: modify the energy function between the computation of the seams: increase the energy at intersection points seam cutting a line modified energy energy function third seam function and new modified again seam Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 19 von digitalen Videos 23. Juli 2012
  • 20. Solution for Diagonal Lines (2) Result original image traditional seam carving improved seam carving Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 20 von digitalen Videos 23. Juli 2012
  • 21. 5. Seam Carving for Video First idea: apply seam carving for each frame separately  the video gets shaky. original video seam carved for each frame separately Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 21 von digitalen Videos 23. Juli 2012
  • 22. Seam Carving for Video: First Idea The video frames define a 3D block over time. We remove 2D “seam surfaces”. The seam pixels of one surface are connected in the third dimension. We use a graph algorithm (min-cut max-flow) to discover optimal “seam surfaces”. Problem: takes considerable time to compute. time Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 22 von digitalen Videos 23. Juli 2012
  • 23. Seam Carving for Videos: Second Idea Fast seam carving for video • Accumulate all energy values of all frames in the first frame. • Compute the optimal seams there. • Map those seams back to the block of frames. Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 23 von digitalen Videos 23. Juli 2012
  • 24. Example for the Second Idea seams carved separately fast seam carving for each frame Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 24 von digitalen Videos 23. Juli 2012
  • 25. Another Example scaling fast seam carving Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 25 von digitalen Videos 23. Juli 2012
  • 26. 6. Conclusions and Outlook • Seam Carving is a useful technique to reduce image sizes without losing relevant content. • Finding a good energy function is a real challenge. • Improvements are possible for diagonal lines. • Flicker removal is of critical importance for videos. Fast Seam Carving is a useful algorithm for that problem. • Seam carving does not work well if most of the content is relevant for the viewer. • Seam Carving can be combined with other techniques to create pleasant smal-screen versions of video. Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 26 von digitalen Videos 23. Juli 2012
  • 27. Vielen Dank … … für Ihre Aufmerksamkeit! Meine Mailadresse ist effelsberg@informatik.uni-mannheim.de Algorithmen zum Verkleinern Klagenfurt Wolfgang Effelsberg 27 von digitalen Videos 23. Juli 2012