calicam


Namecalicam JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryGUI tool for calibrating motion capture systems composed of multiple standard webcams
upload_time2023-01-30 17:41:04
maintainer
docs_urlNone
author
requires_python>=3.10
license
keywords opencv tracking calibration python webcam
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Current Functionality

To launch the primary functionality of the repo, run `src\gui\main.py`. This will open an ugly dialog to begin a calibration session. Session data is stored in the `sessions` folder in the root directory. The session being launched is coded at the bottom of `main.py`. The general workflow:

1. Print out a charuco board from the Charuco Builder tab
2. Click "Find Additional Cameras" to connect to them
3. Go to the camera tabs and configure resolution/exposure before collecting calibration corners and calibrating.
4. Save calibration parameters on camera tab
5. Once all cameras intrinsic factors are estimated, click the stereocalibration button and calibrate each pair of cameras.
6. Save calibration to `config.toml`.

# Recording

The file `src\recording\video_recorder.py` will launch a VideoRecorder and store the mp4 and frametime data in the session folder. 

# Triangulating

Recorded video can be played back through the synchronizer with synched frames passed to the PairedPointStream which uses the charuco tracker to identify the same point in space between paired frames. Point ID and (X,Y) position for each frame are passed to an `out_q`. The triangulator pulls from this queue, calculates values for ID: (X,Y,Z) and places that calculation on its own `out_q`

# Visualization

The Visualizer constructs camera meshes based on `config.toml` to allow a gut check of the stereocalibration parameters. The camera mesh shape is determined by the actual camera properties and provides another way of assessing reasonableness at a glance. (X,Y,Z) points are read from `triangulator.out_q` and updated to the scene. 

Currently, the origin is the base camera from the stereocalibration pair. Next planned steps include a way to set the origin.

## Current Object Relationships

The general flow of processing is illustrated in the graph below. This does not represent any of the GUI elements which are still a work in progress. My immediate next steps are to stabilize the GUI, making it easier to incorporate the full set of actions that are currently permitted by the back-end of the code base.

```mermaid
graph TD

subgraph cameras
Camera --> LiveStream
LiveStream --> Synchronizer
end

subgraph calibration
Charuco --> CornerTracker
CornerTracker --> Monocalibrator
CornerTracker --> Stereocalibrator
end

Synchronizer --> Stereocalibrator
LiveStream --> Monocalibrator

subgraph calibration_data
config.toml
StereoCalRecordings
end

Stereocalibrator -.via Session.-> config.toml
calibration -.via Session.-> StereoCalRecordings
Monocalibrator -.via Session.-> config.toml
calibration_data --> ArrayConstructor

subgraph array
ArrayConstructor
end

Synchronizer --> PairedPointStream 

subgraph recording
Synchronizer --> VideoRecorder
VideoRecorder --> port_#.mp4
VideoRecorder --> frame_time_history.csv

port_#.mp4 --> RecordedStream
frame_time_history.csv --> RecordedStream
RecordedStream --> Synchronizer
end

CornerTracker -.temporary for testing.- PairedPointStream

subgraph triangulate
PairedPointStream --> StereoTriangulator
end

subgraph visualization
CameraMesh --> Visualizer
StereoTriangulator --> Visualizer
end

```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "calicam",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "opencv,tracking,calibration,python,webcam",
    "author": "",
    "author_email": "Mac Prible <prible@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f5/1b/bd33e5c9c91e25483eccd2890d67337aec528a10aca53b0666b933087cc3/calicam-0.0.3.tar.gz",
    "platform": null,
    "description": "# Current Functionality\n\nTo launch the primary functionality of the repo, run `src\\gui\\main.py`. This will open an ugly dialog to begin a calibration session. Session data is stored in the `sessions` folder in the root directory. The session being launched is coded at the bottom of `main.py`. The general workflow:\n\n1. Print out a charuco board from the Charuco Builder tab\n2. Click \"Find Additional Cameras\" to connect to them\n3. Go to the camera tabs and configure resolution/exposure before collecting calibration corners and calibrating.\n4. Save calibration parameters on camera tab\n5. Once all cameras intrinsic factors are estimated, click the stereocalibration button and calibrate each pair of cameras.\n6. Save calibration to `config.toml`.\n\n# Recording\n\nThe file `src\\recording\\video_recorder.py` will launch a VideoRecorder and store the mp4 and frametime data in the session folder. \n\n# Triangulating\n\nRecorded video can be played back through the synchronizer with synched frames passed to the PairedPointStream which uses the charuco tracker to identify the same point in space between paired frames. Point ID and (X,Y) position for each frame are passed to an `out_q`. The triangulator pulls from this queue, calculates values for ID: (X,Y,Z) and places that calculation on its own `out_q`\n\n# Visualization\n\nThe Visualizer constructs camera meshes based on `config.toml` to allow a gut check of the stereocalibration parameters. The camera mesh shape is determined by the actual camera properties and provides another way of assessing reasonableness at a glance. (X,Y,Z) points are read from `triangulator.out_q` and updated to the scene. \n\nCurrently, the origin is the base camera from the stereocalibration pair. Next planned steps include a way to set the origin.\n\n## Current Object Relationships\n\nThe general flow of processing is illustrated in the graph below. This does not represent any of the GUI elements which are still a work in progress. My immediate next steps are to stabilize the GUI, making it easier to incorporate the full set of actions that are currently permitted by the back-end of the code base.\n\n```mermaid\ngraph TD\n\nsubgraph cameras\nCamera --> LiveStream\nLiveStream --> Synchronizer\nend\n\nsubgraph calibration\nCharuco --> CornerTracker\nCornerTracker --> Monocalibrator\nCornerTracker --> Stereocalibrator\nend\n\nSynchronizer --> Stereocalibrator\nLiveStream --> Monocalibrator\n\nsubgraph calibration_data\nconfig.toml\nStereoCalRecordings\nend\n\nStereocalibrator -.via Session.-> config.toml\ncalibration -.via Session.-> StereoCalRecordings\nMonocalibrator -.via Session.-> config.toml\ncalibration_data --> ArrayConstructor\n\nsubgraph array\nArrayConstructor\nend\n\nSynchronizer --> PairedPointStream \n\nsubgraph recording\nSynchronizer --> VideoRecorder\nVideoRecorder --> port_#.mp4\nVideoRecorder --> frame_time_history.csv\n\nport_#.mp4 --> RecordedStream\nframe_time_history.csv --> RecordedStream\nRecordedStream --> Synchronizer\nend\n\nCornerTracker -.temporary for testing.- PairedPointStream\n\nsubgraph triangulate\nPairedPointStream --> StereoTriangulator\nend\n\nsubgraph visualization\nCameraMesh --> Visualizer\nStereoTriangulator --> Visualizer\nend\n\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "GUI tool for calibrating motion capture systems composed of multiple standard webcams",
    "version": "0.0.3",
    "split_keywords": [
        "opencv",
        "tracking",
        "calibration",
        "python",
        "webcam"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6fc70fef037d790afa83293bdec4816992c4a09045a4a7cde7d135d1293a0595",
                "md5": "bde84edfb1816d8ec7360ff9ce5972c5",
                "sha256": "d8fa493891b7098ca2d1e5707095b58b027f212c1338247438b942269b5a7906"
            },
            "downloads": -1,
            "filename": "calicam-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bde84edfb1816d8ec7360ff9ce5972c5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 159139,
            "upload_time": "2023-01-30T17:41:02",
            "upload_time_iso_8601": "2023-01-30T17:41:02.386701Z",
            "url": "https://files.pythonhosted.org/packages/6f/c7/0fef037d790afa83293bdec4816992c4a09045a4a7cde7d135d1293a0595/calicam-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f51bbd33e5c9c91e25483eccd2890d67337aec528a10aca53b0666b933087cc3",
                "md5": "5c6513098ec97ef4f206d434e945d6e4",
                "sha256": "31f6706424de32b86d5f15bf910dd9c78fb2b9b40069111e5ba6d080de8d3a3f"
            },
            "downloads": -1,
            "filename": "calicam-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5c6513098ec97ef4f206d434e945d6e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 5318876,
            "upload_time": "2023-01-30T17:41:04",
            "upload_time_iso_8601": "2023-01-30T17:41:04.803462Z",
            "url": "https://files.pythonhosted.org/packages/f5/1b/bd33e5c9c91e25483eccd2890d67337aec528a10aca53b0666b933087cc3/calicam-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-30 17:41:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "calicam"
}
        
Elapsed time: 0.39120s