Name | lite-camera JSON |
Version |
2.0.7
JSON |
| download |
home_page | https://github.com/yushulx/python-lite-camera |
Summary | LiteCam is a lightweight, cross-platform library for capturing RGB frames from cameras and displaying them. Designed with simplicity and ease of integration in mind, LiteCam supports Windows, Linux and macOS platforms. |
upload_time | 2025-08-22 00:47:02 |
maintainer | None |
docs_url | None |
author | yushulx |
requires_python | None |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# LiteCam for Python
[LiteCam](https://github.com/yushulx/cmake-cpp-barcode-qrcode-mrz/tree/main/litecam) is a lightweight, cross-platform library for capturing RGB frames from cameras and displaying them. Designed with simplicity and ease of integration in mind, LiteCam supports **Windows**, **Linux** and **macOS** platforms. It integrates easily with image processing frameworks like **OpenCV**, making it a versatile choice for developers.

## Features
- Capture RGB frames from video devices.
- Display live frames in a window.
- Draw contours and text directly on the displayed frames.
- Simple API for quick integration.
## Supported Platforms
- **Windows**
- **Linux**
- **macOS**
## How to Build the CPython Extension
- Development Mode
```bash
python setup.py develop
```
- Wheel Package
```bash
python setup.py bdist_wheel
```
- Source Distribution
```bash
python setup.py sdist
```
## Usage
### Basic Example
```python
import litecam
camera = litecam.PyCamera()
if camera.open(0):
window = litecam.PyWindow(
camera.getWidth(), camera.getHeight(), "Camera Stream")
while window.waitKey('q'):
frame = camera.captureFrame()
if frame is not None:
width = frame[0]
height = frame[1]
size = frame[2]
data = frame[3]
window.showFrame(width, height, data)
camera.release()
```
### API Overview
- **getDeviceList()**: Lists available video capture devices.
- **saveJpeg(filename, width, height, rgbdata)**: Saves the frame as a JPEG image.
#### PyCamera
- **open(index)**: Opens the camera with the specified index.
- **listMediaTypes()**: Lists supported media types.
- **setResolution(int width, int height)**: Sets the resolution for the camera.
- **captureFrame()`**: Captures a single RGB frame.
- **release()**: Closes the camera and releases resources.
- **getWidth()**: Returns the width of the frame.
- **getHeight()**: Returns the height of the frame.
#### PyWindow
- **waitKey(key)**: Waits for user input; returns `false` if the specified key is pressed or the window is closed.
- **showFrame(width, height, rgbdata)**: Displays an RGB frame.
- **drawContour(points)**: Draws contours on the frame.
- **drawText(text, x, y, fontSize, color)**: Draws text on the frame.
Raw data
{
"_id": null,
"home_page": "https://github.com/yushulx/python-lite-camera",
"name": "lite-camera",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "yushulx",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/84/9c/388395467d9bf19a7a5f787956ddb6cdbb00c7bda3282893a19ba6373b04/lite_camera-2.0.7.tar.gz",
"platform": null,
"description": "# LiteCam for Python\r\n[LiteCam](https://github.com/yushulx/cmake-cpp-barcode-qrcode-mrz/tree/main/litecam) is a lightweight, cross-platform library for capturing RGB frames from cameras and displaying them. Designed with simplicity and ease of integration in mind, LiteCam supports **Windows**, **Linux** and **macOS** platforms. It integrates easily with image processing frameworks like **OpenCV**, making it a versatile choice for developers.\r\n\r\n\r\n\r\n## Features\r\n\r\n- Capture RGB frames from video devices.\r\n- Display live frames in a window.\r\n- Draw contours and text directly on the displayed frames.\r\n- Simple API for quick integration.\r\n\r\n## Supported Platforms\r\n\r\n- **Windows**\r\n- **Linux**\r\n- **macOS**\r\n\r\n## How to Build the CPython Extension \r\n- Development Mode\r\n \r\n ```bash\r\n python setup.py develop\r\n ```\r\n\r\n- Wheel Package\r\n\r\n ```bash\r\n python setup.py bdist_wheel\r\n ```\r\n\r\n- Source Distribution\r\n\r\n ```bash\r\n python setup.py sdist\r\n ```\r\n\r\n## Usage\r\n\r\n### Basic Example\r\n\r\n```python\r\nimport litecam\r\n\r\ncamera = litecam.PyCamera()\r\n\r\nif camera.open(0):\r\n\r\n window = litecam.PyWindow(\r\n camera.getWidth(), camera.getHeight(), \"Camera Stream\")\r\n\r\n while window.waitKey('q'):\r\n frame = camera.captureFrame()\r\n if frame is not None:\r\n width = frame[0]\r\n height = frame[1]\r\n size = frame[2]\r\n data = frame[3]\r\n window.showFrame(width, height, data)\r\n\r\n camera.release()\r\n```\r\n\r\n### API Overview\r\n\r\n- **getDeviceList()**: Lists available video capture devices.\r\n- **saveJpeg(filename, width, height, rgbdata)**: Saves the frame as a JPEG image.\r\n\r\n#### PyCamera\r\n- **open(index)**: Opens the camera with the specified index.\r\n- **listMediaTypes()**: Lists supported media types.\r\n- **setResolution(int width, int height)**: Sets the resolution for the camera.\r\n- **captureFrame()`**: Captures a single RGB frame.\r\n- **release()**: Closes the camera and releases resources.\r\n- **getWidth()**: Returns the width of the frame.\r\n- **getHeight()**: Returns the height of the frame.\r\n\r\n#### PyWindow\r\n- **waitKey(key)**: Waits for user input; returns `false` if the specified key is pressed or the window is closed.\r\n- **showFrame(width, height, rgbdata)**: Displays an RGB frame.\r\n- **drawContour(points)**: Draws contours on the frame.\r\n- **drawText(text, x, y, fontSize, color)**: Draws text on the frame.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "LiteCam is a lightweight, cross-platform library for capturing RGB frames from cameras and displaying them. Designed with simplicity and ease of integration in mind, LiteCam supports Windows, Linux and macOS platforms.",
"version": "2.0.7",
"project_urls": {
"Homepage": "https://github.com/yushulx/python-lite-camera"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "dde801e02e1e6e31f480642a0d4aad66f5318ab532873cb96bb26a8118b11cbe",
"md5": "71312d5e2035c4bf9e289fd743f45695",
"sha256": "8d5f2098791ae9bd7f58ec941cd22ff05b7202cb61bd64a499494ac55fe627ae"
},
"downloads": -1,
"filename": "lite_camera-2.0.7-cp310-cp310-win_amd64.whl",
"has_sig": false,
"md5_digest": "71312d5e2035c4bf9e289fd743f45695",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": null,
"size": 30166,
"upload_time": "2025-08-22T00:46:57",
"upload_time_iso_8601": "2025-08-22T00:46:57.642075Z",
"url": "https://files.pythonhosted.org/packages/dd/e8/01e02e1e6e31f480642a0d4aad66f5318ab532873cb96bb26a8118b11cbe/lite_camera-2.0.7-cp310-cp310-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6527894fc8ad5e91ab8b4a87c6f27bc62442bb311d583687d41ef6c91d0d6e4e",
"md5": "5c45557f934c937c73b60c4573bc3d9a",
"sha256": "f77e0975a2484b0659b0741114f97f9891d8aa84c36684f0637d6f5277e6818a"
},
"downloads": -1,
"filename": "lite_camera-2.0.7-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "5c45557f934c937c73b60c4573bc3d9a",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": null,
"size": 30167,
"upload_time": "2025-08-22T00:46:58",
"upload_time_iso_8601": "2025-08-22T00:46:58.459973Z",
"url": "https://files.pythonhosted.org/packages/65/27/894fc8ad5e91ab8b4a87c6f27bc62442bb311d583687d41ef6c91d0d6e4e/lite_camera-2.0.7-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b8905da11aac8e9227845b27ef7cbb35392fd91bba63304a1804e3826858778b",
"md5": "0be0352159107fb3f9c136bb678c076c",
"sha256": "cdad0ce8cf09dad851b1e5ea4be0288e8151c1fbe4968b8532836bb8b2a7b4c4"
},
"downloads": -1,
"filename": "lite_camera-2.0.7-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "0be0352159107fb3f9c136bb678c076c",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": null,
"size": 30180,
"upload_time": "2025-08-22T00:46:59",
"upload_time_iso_8601": "2025-08-22T00:46:59.383062Z",
"url": "https://files.pythonhosted.org/packages/b8/90/5da11aac8e9227845b27ef7cbb35392fd91bba63304a1804e3826858778b/lite_camera-2.0.7-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "20d4ac5cd559c3cd5ce1abf1a82ab86968e99f7f8b64d4a35bf3d90ed25c2c8e",
"md5": "244ed4f5422c5033c6ea6cd31a004fa4",
"sha256": "965fd6244251edd9ec4ea061779e774308eb541a160f2e31307e0cccece67094"
},
"downloads": -1,
"filename": "lite_camera-2.0.7-cp313-cp313-win_amd64.whl",
"has_sig": false,
"md5_digest": "244ed4f5422c5033c6ea6cd31a004fa4",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": null,
"size": 30179,
"upload_time": "2025-08-22T00:47:00",
"upload_time_iso_8601": "2025-08-22T00:47:00.124369Z",
"url": "https://files.pythonhosted.org/packages/20/d4/ac5cd559c3cd5ce1abf1a82ab86968e99f7f8b64d4a35bf3d90ed25c2c8e/lite_camera-2.0.7-cp313-cp313-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "339e23205b833406d5e0a780a33018a132393197e440e684ef9c233cbcd0c71e",
"md5": "f1707f834114e917e55b06b358947bfa",
"sha256": "1f11f12295b84c8334329ef0df7ad558cce33305ee2029842573207d3f581f18"
},
"downloads": -1,
"filename": "lite_camera-2.0.7-cp38-cp38-win_amd64.whl",
"has_sig": false,
"md5_digest": "f1707f834114e917e55b06b358947bfa",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 30127,
"upload_time": "2025-08-22T00:47:01",
"upload_time_iso_8601": "2025-08-22T00:47:01.088548Z",
"url": "https://files.pythonhosted.org/packages/33/9e/23205b833406d5e0a780a33018a132393197e440e684ef9c233cbcd0c71e/lite_camera-2.0.7-cp38-cp38-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ef97157bb98b00a573950a485eca76782f820b79fd9c1b6d61a8d223fd72f673",
"md5": "f42aca023468dd9a9cab97011d6e5c53",
"sha256": "3328986dec748a8794e1d534f8c568baea2144e557533bf5d58a80f57b16f9a7"
},
"downloads": -1,
"filename": "lite_camera-2.0.7-cp39-cp39-win_amd64.whl",
"has_sig": false,
"md5_digest": "f42aca023468dd9a9cab97011d6e5c53",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 30204,
"upload_time": "2025-08-22T00:47:01",
"upload_time_iso_8601": "2025-08-22T00:47:01.764435Z",
"url": "https://files.pythonhosted.org/packages/ef/97/157bb98b00a573950a485eca76782f820b79fd9c1b6d61a8d223fd72f673/lite_camera-2.0.7-cp39-cp39-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "849c388395467d9bf19a7a5f787956ddb6cdbb00c7bda3282893a19ba6373b04",
"md5": "8b92a66cbace0cf38b91dbc3b228716e",
"sha256": "7957e5207891dd93aeab4636b193ba8221345b0dab584799ece3af75ebfe9099"
},
"downloads": -1,
"filename": "lite_camera-2.0.7.tar.gz",
"has_sig": false,
"md5_digest": "8b92a66cbace0cf38b91dbc3b228716e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 71185,
"upload_time": "2025-08-22T00:47:02",
"upload_time_iso_8601": "2025-08-22T00:47:02.452063Z",
"url": "https://files.pythonhosted.org/packages/84/9c/388395467d9bf19a7a5f787956ddb6cdbb00c7bda3282893a19ba6373b04/lite_camera-2.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-22 00:47:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yushulx",
"github_project": "python-lite-camera",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "lite-camera"
}