explaingit

duy-phamduc68/cctv-inverse-perspective-mapping

Analysis updated 2026-05-18

0PythonAudience · researcherComplexity · 3/5Setup · moderate

TLDR

A Python calibration tool that maps angled traffic camera footage onto a flat, top-down satellite view.

Mindmap

mindmap
  root((CCTV IPM))
    What it does
      Camera to map alignment
      Inverse perspective mapping
      Two way projection
    Tech stack
      Python
      PyQt5
    Use cases
      Traffic camera calibration
      Distortion correction
      TrafficLab 3D pipeline
    Audience
      Traffic researchers
      Computer vision developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Calibrate a traffic camera so its footage aligns with a satellite map.

USE CASE 2

Convert coordinates between a camera frame and real-world map positions using G-projection files.

USE CASE 3

Correct lens distortion and parallax in fixed traffic camera setups.

USE CASE 4

Feed calibration output into the larger TrafficLab 3D project pipeline.

What is it built with?

PythonPyQt5

How does it compare?

duy-phamduc68/cctv-inverse-perspective-mapping0xhassaan/nn-from-scratch3ks/embedoc
Stars00
LanguagePythonPythonPython
Last pushed2023-06-08
MaintenanceDormant
Setup difficultymoderatemoderatehard
Complexity3/54/51/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Calibration is largely manual and requires PyQt5 for the graphical interface.

In plain English

This is a calibration tool for aligning traffic camera footage with satellite imagery. The specific technique it uses is called Inverse Perspective Mapping, a way of mathematically transforming a camera's angled, ground-level view into a flat, top-down perspective that matches a satellite or map image. Once calibrated, the tool creates a two-way projection: you can convert a point in the camera frame to its location on the map, and the other way around. The tool handles common camera issues such as lens distortion and parallax, the way nearby objects appear to shift more than distant ones as the camera moves. It outputs the calibration results, including distortion correction data, homography matrices, camera pose, and scale, as reusable JSON files, which the author refers to as G-projection files. These can then be used by other software in the same project pipeline. This module was extracted from a larger project called TrafficLab 3D and published as a standalone repo so that the calibration process can be improved over time. Currently the workflow is largely manual. The tool is written in Python and uses PyQt5 for its graphical interface. It is intended for researchers or developers working on traffic analysis who need to map camera footage onto real-world coordinates. A companion blog post and a guide video covering the broader TrafficLab 3D project are linked in the README.

Copy-paste prompts

Prompt 1
Explain what a G-projection JSON file contains and how it is used in this project.
Prompt 2
Walk me through calibrating a traffic camera with this Inverse Perspective Mapping tool.
Prompt 3
Show me how homography and camera pose are calculated in this codebase.
Prompt 4
Help me automate the currently manual calibration workflow in this tool.

Frequently asked questions

What is cctv-inverse-perspective-mapping?

A Python calibration tool that maps angled traffic camera footage onto a flat, top-down satellite view.

What language is cctv-inverse-perspective-mapping written in?

Mainly Python. The stack also includes Python, PyQt5.

How hard is cctv-inverse-perspective-mapping to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is cctv-inverse-perspective-mapping for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.