# andrewssobral/bgslibrary

A C++ Background Subtraction Library with wrappers for Python, MATLAB, Java and GUI on QT

Repository: https://github.com/andrewssobral/bgslibrary
Canonical: https://ross.abutalabs.com/products/bgslibrary
Language: C++
License: MIT
License Family: permissive
Topics: background-subtraction, opencv, bgs, computer-vision, foreground-detection, pybgs, moving-object-detection
Last push: 2026-05-28T13:02:05+00:00

## Health v2 (maintenance only)
Score: 61/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 84, release rhythm 8, longevity 100
- inputs: {"age_days": 4581, "days_push": 97, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2277, forks 736 (observed 2026-08-28T04:06:33.555905+00:00)

## What it is
BGSLibrary is a C++ framework for background subtraction in video, offering 43 algorithms for foreground-background separation built on OpenCV. It includes wrappers for Python, MATLAB, and Java, plus a Qt-based GUI, and works on Windows, Linux, and macOS.

## Use cases
- detect moving objects in video streams
- separate foreground from background in surveillance footage
- compare background subtraction algorithms on benchmark videos
- use background subtraction from Python with OpenCV
- build a people or vehicle counter from camera video
- experiment with motion detection algorithms in C++

## When to choose
- you need many background subtraction algorithms behind one API
- you want OpenCV-compatible C++ code with Python bindings
- you're researching or benchmarking foreground detection methods
- you need MIT-licensed code usable in commercial projects

## When to avoid
- you need deep-learning-based video segmentation rather than classical methods
- you want a ready-made application rather than a library to integrate
- your project doesn't use OpenCV and you can't add it as a dependency

## Facets
- artifact type: library
- maturity: active
- function: computer-vision, image-processing, video-processing
- domain: computer-vision, image-processing
- platform: cpp, python, cross-platform, windows
- tags: background-subtraction, opencv, foreground-detection, moving-object-detection, motion-detection, video-analysis, pybgs, video, linux, macos

## Member repositories
- andrewssobral/bgslibrary (main) score 61

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:33.555905+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:41:25.946377+00:00, confidence not recorded.
  - readme: https://github.com/andrewssobral/bgslibrary (fetched 2026-08-28T04:06:33.555905+00:00, sha aa7df247a292)
- Data as of 2026-08-30T08:39:29.467469+00:00.
