opencv-chessboard-generator


Nameopencv-chessboard-generator JSON
Version 1.0.7 PyPI version JSON
download
home_pagehttps://github.com/flavvesResearch/chessboard-calibration-generator
SummaryA tool to generate chessboard patterns for OpenCV camera calibration
upload_time2025-10-15 08:36:53
maintainerNone
docs_urlNone
authorbatuhan ÖKMEN
requires_python>=3.7
licenseMIT
keywords opencv calibration chessboard camera computer-vision
VCS
bugtrack_url
requirements opencv-python numpy
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OpenCV Chessboard Generator

[![PyPI version](https://badge.fury.io/py/opencv-chessboard-generator.svg)](https://badge.fury.io/py/opencv-chessboard-generator)
[![Python versions](https://img.shields.io/pypi/pyversions/opencv-chessboard-generator.svg)](https://pypi.org/project/opencv-chessboard-generator/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A Python tool to generate high-quality chessboard patterns for OpenCV camera calibration.

## Features

- 🎯 Customizable grid dimensions (rows × columns)
- 📏 Configurable square size in centimeters
- 🖨️ Print-ready output with exact DPI settings
- 👁️ Preview before saving
- 📦 Easy to use Python API and CLI

## Installation

Install from PyPI:

```bash
pip install opencv-chessboard-generator
```

## Usage

### Command Line Interface

After installation, run the interactive CLI:

```bash
chessboard-generator
```

Follow the prompts to specify:

- Number of inner corner columns (e.g., 6)
- Number of inner corner rows (e.g., 9)
- Square size in centimeters (default: 3.0)
- DPI resolution for printing (default: 300)

### Python API

```python
from chessboard_generator import ChessboardGenerator

# Create a chessboard with 6x9 inner corners, 3cm squares, 300 DPI
generator = ChessboardGenerator(rows=9, cols=6, square_size_cm=3.0, dpi=300)

# Save to file
generator.save("my_chessboard.png")

# Or preview before saving
generator.preview()
```

### Recommended Settings for A3 Paper

For A3 paper (29.7 × 42 cm), we recommend:

- **13×8 inner corners** (landscape orientation)
- **Square size: 3.0 cm**
- **DPI: 300**

```python
generator = ChessboardGenerator(rows=8, cols=13, square_size_cm=3.0, dpi=300)
generator.save("chessboard_a3.png")
```

## Printing Instructions

⚠️ **IMPORTANT**: For accurate camera calibration, print settings matter!

1. Print at **EXACTLY** the specified DPI (no scaling)
2. Disable "Fit to page" in print settings
3. Use 100% scaling
4. Mount the printed chessboard on a flat, rigid surface
5. Measure the printed squares to verify they match your specified size

## OpenCV Integration

After generating your chessboard, use it with OpenCV:

```python
import cv2

# For a 6×9 inner corners chessboard
pattern_size = (6, 9)
square_size = 3.0  # cm

# Find chessboard corners in your calibration images
ret, corners = cv2.findChessboardCorners(image, pattern_size)
```

## Requirements

- Python >= 3.7
- OpenCV >= 4.5.0
- NumPy >= 1.19.0

## License

MIT License

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Development

For development setup and automated releases with GitHub Actions, see:
- [Quick Start Guide](QUICKSTART.md)
- [Detailed GitHub Actions Guide](GITHUB_ACTIONS_GUIDE.md)

## Author

Batuhan ÖKMEN (batuhanokmen@gmail.com)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/flavvesResearch/chessboard-calibration-generator",
    "name": "opencv-chessboard-generator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "opencv, calibration, chessboard, camera, computer-vision",
    "author": "batuhan \u00d6KMEN",
    "author_email": "Batuhan \u00d6KMEN <batuhanokmen@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/73/aa/471117d4acdacfd251391e6796d23f7dad333c45daf400d5eb0792a2149c/opencv_chessboard_generator-1.0.7.tar.gz",
    "platform": null,
    "description": "# OpenCV Chessboard Generator\n\n[![PyPI version](https://badge.fury.io/py/opencv-chessboard-generator.svg)](https://badge.fury.io/py/opencv-chessboard-generator)\n[![Python versions](https://img.shields.io/pypi/pyversions/opencv-chessboard-generator.svg)](https://pypi.org/project/opencv-chessboard-generator/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA Python tool to generate high-quality chessboard patterns for OpenCV camera calibration.\n\n## Features\n\n- \ud83c\udfaf Customizable grid dimensions (rows \u00d7 columns)\n- \ud83d\udccf Configurable square size in centimeters\n- \ud83d\udda8\ufe0f Print-ready output with exact DPI settings\n- \ud83d\udc41\ufe0f Preview before saving\n- \ud83d\udce6 Easy to use Python API and CLI\n\n## Installation\n\nInstall from PyPI:\n\n```bash\npip install opencv-chessboard-generator\n```\n\n## Usage\n\n### Command Line Interface\n\nAfter installation, run the interactive CLI:\n\n```bash\nchessboard-generator\n```\n\nFollow the prompts to specify:\n\n- Number of inner corner columns (e.g., 6)\n- Number of inner corner rows (e.g., 9)\n- Square size in centimeters (default: 3.0)\n- DPI resolution for printing (default: 300)\n\n### Python API\n\n```python\nfrom chessboard_generator import ChessboardGenerator\n\n# Create a chessboard with 6x9 inner corners, 3cm squares, 300 DPI\ngenerator = ChessboardGenerator(rows=9, cols=6, square_size_cm=3.0, dpi=300)\n\n# Save to file\ngenerator.save(\"my_chessboard.png\")\n\n# Or preview before saving\ngenerator.preview()\n```\n\n### Recommended Settings for A3 Paper\n\nFor A3 paper (29.7 \u00d7 42 cm), we recommend:\n\n- **13\u00d78 inner corners** (landscape orientation)\n- **Square size: 3.0 cm**\n- **DPI: 300**\n\n```python\ngenerator = ChessboardGenerator(rows=8, cols=13, square_size_cm=3.0, dpi=300)\ngenerator.save(\"chessboard_a3.png\")\n```\n\n## Printing Instructions\n\n\u26a0\ufe0f **IMPORTANT**: For accurate camera calibration, print settings matter!\n\n1. Print at **EXACTLY** the specified DPI (no scaling)\n2. Disable \"Fit to page\" in print settings\n3. Use 100% scaling\n4. Mount the printed chessboard on a flat, rigid surface\n5. Measure the printed squares to verify they match your specified size\n\n## OpenCV Integration\n\nAfter generating your chessboard, use it with OpenCV:\n\n```python\nimport cv2\n\n# For a 6\u00d79 inner corners chessboard\npattern_size = (6, 9)\nsquare_size = 3.0  # cm\n\n# Find chessboard corners in your calibration images\nret, corners = cv2.findChessboardCorners(image, pattern_size)\n```\n\n## Requirements\n\n- Python >= 3.7\n- OpenCV >= 4.5.0\n- NumPy >= 1.19.0\n\n## License\n\nMIT License\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Development\n\nFor development setup and automated releases with GitHub Actions, see:\n- [Quick Start Guide](QUICKSTART.md)\n- [Detailed GitHub Actions Guide](GITHUB_ACTIONS_GUIDE.md)\n\n## Author\n\nBatuhan \u00d6KMEN (batuhanokmen@gmail.com)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool to generate chessboard patterns for OpenCV camera calibration",
    "version": "1.0.7",
    "project_urls": {
        "Bug Reports": "https://github.com/flavvesResearch/chessboard-calibration-generator/issues",
        "Homepage": "https://github.com/flavvesResearch/chessboard-calibration-generator",
        "Source": "https://github.com/flavvesResearch/chessboard-calibration-generator"
    },
    "split_keywords": [
        "opencv",
        " calibration",
        " chessboard",
        " camera",
        " computer-vision"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1de6c04bebe950ffee6abfd161ff173aa788dd2cbe5a49631cf35b82bac6d07b",
                "md5": "ee8c1e5a7fabccdc58a85cfff1e6d2cd",
                "sha256": "d9ce3e013246e86b2b076669b012364367e68528ca4cd66b82116601b3fe6da5"
            },
            "downloads": -1,
            "filename": "opencv_chessboard_generator-1.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ee8c1e5a7fabccdc58a85cfff1e6d2cd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7352,
            "upload_time": "2025-10-15T08:36:52",
            "upload_time_iso_8601": "2025-10-15T08:36:52.886741Z",
            "url": "https://files.pythonhosted.org/packages/1d/e6/c04bebe950ffee6abfd161ff173aa788dd2cbe5a49631cf35b82bac6d07b/opencv_chessboard_generator-1.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "73aa471117d4acdacfd251391e6796d23f7dad333c45daf400d5eb0792a2149c",
                "md5": "a3098392a787731ee386a7779cfbf0c4",
                "sha256": "78d201ac7c976bac7e2c26127a431481f648738ffa671af6b673f59456611b5e"
            },
            "downloads": -1,
            "filename": "opencv_chessboard_generator-1.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "a3098392a787731ee386a7779cfbf0c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 6592,
            "upload_time": "2025-10-15T08:36:53",
            "upload_time_iso_8601": "2025-10-15T08:36:53.997631Z",
            "url": "https://files.pythonhosted.org/packages/73/aa/471117d4acdacfd251391e6796d23f7dad333c45daf400d5eb0792a2149c/opencv_chessboard_generator-1.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-15 08:36:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "flavvesResearch",
    "github_project": "chessboard-calibration-generator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "opencv-python",
            "specs": [
                [
                    ">=",
                    "4.5.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.19.0"
                ]
            ]
        }
    ],
    "lcname": "opencv-chessboard-generator"
}
        
Elapsed time: 1.93153s