Skip to content

mit-ll/CCSTL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Camera Coordinate System Transform Library

ccstl-image

© 2026 Massachusetts Institute of Technology. The software/firmware is provided to you on an As-Is basis

Summary

Being able to convert between pixels on a camera video feed and 3D points relative to the camera's position can enable a variety of helpful functionality like line-of-sight (LOS) distance and area measurements of a polygon. This can be achieved by first gathering intrinsic properties for the camera system (acquired through calibration usually) and then siting the camera's position so the equations have a reference frame.

Repository Breakdown

This code repository contains 2 primary folders (calibration and ccstl-webserver) along with some supporting scripts/documents that could be useful for generating visuals or filling in calibration parameters.

calibration

This folder contains Python scripts to collect images from a camera system, either fixed or variable focal length, and complete the calibration process to extract intrinsic parameters. The primary parameter of interest is field of view (FOV) which is often provided on the datasheet for fixed focal length cameras or as the minimum and maximum values for zoom capable cameras. The FOV-to-zoom position of a zoom capable camera does not often follow a linear relationship, so it is recommended to complete the calibration for many zoom positions and then attempt to fit a more complex mathematical relationship.

ccstl-webserver

This folder contains a Golang backend with several functions to convert between 2D pixel coordinates and 3D relative positions and a simple JavaScript based frontend that exposes some of these within a basic GUI. The software is config driven to allow for operation without editing code and creating multiple deployments for a system with a variety of cameras. The config will work for any fixed or variable focal length camera(s) and has hooks in place for working with PTZ systems.

Future Work

While the software features were focused on working with a fixed mounted camera and all values relative to the camera's position, the equations can be easily expanded to convert to another coordinate system (like geodetic) by further siting the camera with a global position (latitude, longitude, altitude). This additional work would allow the camera to be mounted on a moving platform like a car or drone.

Another area for expanding functionality would be allowing un-level mounting of the camera system. The cameras used in developing this software package did not have orientation estimation (commonly measured with an onboard inertial measurement unit). Tapping into the rotational orientation could provide better accuracy and allow for a wider range of acceptable mounting styles.

About

Camera calibration and web server for converting between 2D pixel coordinates and 3D local world coordinates

Resources

License

Stars

Watchers

Forks

Contributors