Code Monkey home page Code Monkey logo

green-screen-chroma-key-shia's Introduction

Green Screen Processor for Shia LaBeouf

Take this image of Shia LaBeouf with a green screen behind him from the famous meme where Shia stands in front of a green screen giving a strangely effective motovational speech.

If you haven't seen it, check it out. You'll be glad you did.

Shia LaBeouf

Superimpose Shia on the below image of me and friends.

For Good

How It Works

  1. Import pillow library or Python Image Library must be used to manipulate images on a pixel level.

  2. Each pixel of the image containing the green screen is parsed and compares RGB value with a threshold in order to determine the 'greenness' of the pixel.

  3. Once the 'greenness' of the pixel is determined to be a green screen element, replace the pixel with a corresponding pixel from the background image.

  4. After this is repeated for all pixels (Shia LaBeouf image is 509x905, which means 460,645 pixels), save the image as a standalone.

  5. The threshold is the heart of the algorithm, therefore outputing the RGB values for each pixel from the Shia LaBeouf image into a CSV could provide insight to an improved algorithm.

  6. Voilá, we have our final product. I don't seem to have made the final cut but that's okay.

Shia LaBeouf

"Don't let your dreams be dreams!" Shia LaBeouf

Next Steps

Notice a green outline on our hero, Shia LaBeouf, in the final image.
Fine tuning the chroma key algorithm to detect a greater range of greens could result in a cleaner image.

Libraries Used

os for writing our RGB values to find threshold in foreground image.
pillow or Python Image Library to manipulate images on a pixel level.

green-screen-chroma-key-shia's People

Contributors

xcollantes avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.