Coder Social home page Coder Social logo

greenscreen-coordinates's Introduction

Homography-based Method to Compute Green Screen Coordinates

What does this code do?

The Python program gs_homography.py computes the coordinates of the 4 corners of the green screen on each video frame in the videos of the multi-object tracking scenario in Armory, assuming accurate green screen coordinates are present on the reference frame of the video.

The reference frame can either be the first frame of the video, or explicity provided as a parameter.

Why write this code?

We develop this program because we have observed that the existing green screen coordinates are not stationary in the virtual world of some video frames, causing the green screen (or patch that would be placed on the green screen) to "move."

What does the program do the video frames and green screen coordinates?

The program copies the original videos from a user-provided path (i.e., the "old" dataset), to a new location at a path provided the user (we call this the "new" dataset), and computes and stores the computed green screen coordinates in the new dataset as calculated according to the parameters provided in homography.json.

The program also visualizes the green screen coordinates of the old data as red dots and new data as yellow dots. The video frames with the visualized coordinates are stored in the rgb_w_coords subfolder within each video folder at the new dataset's path. Below we show an example of how the coordinates may be corrected by the program ("before" in red vs "after" in yellow).

zoomed in result images

How to run the program?

python3 gs_homography.py {json file}

While running the program it is necessary to ensure the reference frames from old_data have accurate green screen coordinates

greenscreen-coordinates's People

Contributors

mphute avatar polochau avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mphute

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.