Metadata-Version: 2.4
Name: CDC
Version: 1.0.4
Summary: Color distance calculator.
Project-URL: Homepage, https://github.com/henrikmidtiby/CDC
Project-URL: Issues, https://github.com/henrikmidtiby/CDC/issues
Author-email: Henrik Skov Midtiby <hemi@mmmi.sdu.dk>
Maintainer-email: Henrik Skov Midtiby <hemi@mmmi.sdu.dk>, Henrik Dyrberg Egemose <hde@mmmi.sdu.dk>
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.10
Requires-Dist: matplotlib>=3.9.3
Requires-Dist: numpy>=2.1.3
Requires-Dist: rasterio>=1.4.3
Requires-Dist: scikit-learn>=1.5.2
Requires-Dist: tqdm>=4.67.1
Provides-Extra: dev
Requires-Dist: furo>=2024.8.6; extra == 'dev'
Requires-Dist: mypy>=1.13.0; extra == 'dev'
Requires-Dist: myst-parser>=4.0.0; extra == 'dev'
Requires-Dist: pre-commit>=4.0.1; extra == 'dev'
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
Requires-Dist: pytest>=8.3.4; extra == 'dev'
Requires-Dist: sphinx-argparse>=0.5.2; extra == 'dev'
Requires-Dist: sphinx-copybutton>=0.5.2; extra == 'dev'
Requires-Dist: sphinx-reredirects>=0.1.5; extra == 'dev'
Requires-Dist: sphinx>=8.1.3; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo>=2024.8.6; extra == 'docs'
Requires-Dist: myst-parser>=4.0.0; extra == 'docs'
Requires-Dist: sphinx-argparse>=0.5.2; extra == 'docs'
Requires-Dist: sphinx-copybutton>=0.5.2; extra == 'docs'
Requires-Dist: sphinx-reredirects>=0.1.5; extra == 'docs'
Requires-Dist: sphinx>=8.1.3; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest-cov>=6.0.0; extra == 'test'
Requires-Dist: pytest>=8.3.4; extra == 'test'
Description-Content-Type: text/markdown

# CDC - Color Distance Calculator

CDC can be a useful tool if you want to locate objects in an image / orthomosaic with a certain color. The tool can be used to go from this input image

![Image](docs/source/_static/pumpkins_example/crop_from_orthomosaic.png)

To this output image

![Image](docs/source/_static/pumpkins_example/color_distance_crop.png)

To learn more about the tool, take a look at the tutorial.
* [Tutorial - Segment pumpkins in RGB orthomosaic](https://henrikmidtiby.github.io/CDC/tutorials/test_dataset_tutorial.html)

## Table of contents:

- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [License](#license)
- [Acknowledgement](#acknowledgement)

## Installation

CDC is a python package and can be installed with pip.

```
pip install CDC
```

For more advanced installation, please visit the [Documentation](https://henrikmidtiby.github.io/CDC/) for more information.

## Usage

For a tutorial of how to use CDC on a test dataset, please see [Tutorial](https://henrikmidtiby.github.io/CDC/tutorials_guides.html).

### How to make a reference image and mask

The easiest way to make a reference image is to use your preferred GIS image tool (like [QGIS](https://www.qgis.org/)) to extract a small region from the orthomosaic. To make the mask open the reference image in an image editor and use the pen tool to mark all the desired pixels with red ((255, 0, 0) in RGB).

### Run CDC

To run CDC on an orthomosaic, run the following in a terminal window:

```
CDC path/to/orthomosaic path/to/reference_image path/to/mask_image
```

Run `CDC --help` for more information or see the [Documentation](https://henrikmidtiby.github.io/CDC/).

## Documentation

For a full list of command line arguments see [CLI](https://henrikmidtiby.github.io/CDC/CLI.html). For a reference manual, please visit [Reference Manual](https://henrikmidtiby.github.io/CDC/reference.html)

## Contributing

For contribution guidelines, please see the [Documentation](https://henrikmidtiby.github.io/CDC/contributing.html).

## License

The software is licensed under the BSD-3-Clause license, see [License](LICENSE).

## Acknowledgement

the CDC tool was developed by SDU UAS Center as part of the project Præcisionsfrøavl, that was supported by the [Green Development and Demonstration Programme (GUDP)](https://gudp.lbst.dk/) and [Frøafgiftsfonden](https://froeafgiftsfonden.dk/) both from Denmark.
