Skip to content

Automated video comparison tool using Python and OpenCV. Syncs two video feeds, detects and annotates differences, and logs these differences. Developed for the 402 Software Engineering Group at Robins AFB.

Notifications You must be signed in to change notification settings

HRosser15/Video-Diff-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VideoDiffDetector

Automated video comparison tool using Python and OpenCV. Syncs two video feeds, detects and annotates differences, and logs these differences. Developed for the 402 Software Engineering Group at Robins AFB.

Description

[empty]

Technologies Used

  • Python
  • OpenCV
  • VSCode
  • Git
  • more TBD

Prerequisites for contributing to or running this application:

Python 3.12.1:

  • To check if you have Python 3.12.1, run

    **python -V**

    in a command prompt.

If you don't have Python, please follow these steps:

  • Download the installer from Python's official website. Get the installer for your OS, not the embeddable package.
  • When you run the installer, ensure you check the boxes add python.exe to PATH and use admin privileges when installing py.exe. If you don't, python will not work in VSCode.
  • Select Customize installation and ensure pip is checked.
  • Click "Next" and ensure that Add Python to environment variables is checked.
  • Click "Install"

OpenCV:

  • in your command prompt, terminal, or VSCode terminal, run pip install opencv-contrib-python

NumPy:

  • in your command prompt, terminal, or VSCode terminal, run pip install numpy

VSCode:

Git:

  • Check if you have git installed by using git --version
  • If you don't have it or don't have the most recent version, download and install it from the offical Git website: https://git-scm.com/downloads

VSCode Python Extension:

  • In VSCode, click the extensions button on the left, search for Python, and install it.

Cloning the Repository

  • In VSCode, press CTRL + ` (control + backtick) to open the terminal.
  • Navigate to the directory you want to clone this repo using cd path/to/your/directory
  • Clone the repo using git clone https://github.com/HRosser15/Video-Diff-Detector.git
  • Navigate into the cloned repo using cd Video-Diff-Detector

Where videos should be placed for analysis

  • Videos to be analyzed MUST be in the "Videos" folder.
  • By default, multiple videos are available to test the application on.

Running the program

  • In a terminal, navigate to your cloned repo, where your current directory should be Video-Diff-Detector
  • Enter in python main.py <video1_file_name.ext> <video2_file_name.ext>
  • Replace <video1_file_name.ext> and <video2_file_name.ext> with your desired file names.
  • By default, the application will add the necessary filepath to the beginning of these inputs so they are retrieved from Video-Diff-Detector/Videos/
  • Arguments can be used to alter how sensitive the program is, where it logs the output, and how the annotations look. Refer to the User Manual, Section VI, Subsection A to see a full list of arguments and how to use them.
  • Output logs and images will be saved in a folder called Output. They will be organized first by a folder named after the base video used in a specific isntance, then by the current date and time that the application instance was run

To Begin Contributing

  • Create your own branch with git checkout -b your-branch-name

Pushing Your Local Changes to the GitHub Repo

  • If you haven't already, set your global identity with git config --global user.name "Your Name" and git config --global user.email "[email protected]"
  • To stage your local changes, use git add file1_name.ext file2_name.ext** (if you're staging specific files in the branch)

    - This is useful for committing only files you have completed when some files are a WIP.

    - It is also useful when you have completed a lot of work, and want to separate your commits to make the repo history easier to read

    or `git add .` (with the period if you're staging all files in the branch)

  • To commit the staged changes: git commit This will pull up a COMMIT file. Whatever you type in here will save as the commit message. Please be descriptive here. a general commit message should look like:
[short summary of what you did]

[detailed summary of what you did]

so a commit might look like:

Optimized thresholds for abs_diff.py

Changed threshold in frame_difference() to 20.
Created new function to filter out contours that were too small.
...

Save this file with "CTRL + S" and close it with "CTRL + W".

  • To push your local changes to the repo, use git push origin your-branch-name
  • If you forgot your branch name or want to confirm you are on the right branch, use git branch to view the list of branches. Your current branch should be marked with an asterisk (*) and be a different color.
  • To merge your branch with the main branch, Submit a pull request on GitHub and wait for someone to review it.

About

Automated video comparison tool using Python and OpenCV. Syncs two video feeds, detects and annotates differences, and logs these differences. Developed for the 402 Software Engineering Group at Robins AFB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages