opencv

opencv / MovementDetectionDemo / 0.1.1

README.md

Warning: This algorithm performs best on videos that resemble security video footage of humans moving through a stable background. It may not perform well on other types of video.

Introduction

This algorithm detects movement in a given video.

Input:

  • (Required): URL to the video on the Data API (http://algorithmia.com/data).
  • (Required): Location of where the results are going to be saved.
  • (Required): If 1; frames of the video are flipped.
    If 0; no flip. It is important to give the correct value for this parameter because the algorithm adjusts the background subtraction parameters according to the position of objects in the frame and orientation affects this vastly.

Output

  • Location of where the results are stored. The text file is going to contain "Frame# [Rectangle1,Rectangle2,...,RectangeN]" on each line where rectangles are going to have their x, y, width and height separated by spaces.

Example

  • Parameter 1: Security footage.
  • Parameter 2: Results output location.
  • Parameter 3: Settings flag.

Input:

[
    "data://opencv/MLabsVideos/SFPD_security_footage.mp4",
    "data://.algo/temp/output.txt",
    0
]

Output:

"data://.algo/temp/output.txt"