Metadata-Version: 2.3
Name: ms_camera_model
Version: 1.0.0
Summary: Multispectral Camera Simulation Model
Keywords: multispectral,hyperspectral,model
Author: Tomas Vacek
Author-email: Tomas Vacek <vacek.tomas@weaport.eu>
License: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: OS Independent
Requires-Dist: matplotlib>=3.10.8
Requires-Dist: numpy>=2.2.6
Requires-Dist: opencv-python>=4.13.0.92
Requires-Dist: pandas>=2.3.3
Requires-Dist: scikit-image>=0.25.2
Requires-Dist: spectral>=0.24
Requires-Dist: micasense-imageprocessing>=0.1.2
Requires-Dist: openpyxl>=3.1.5
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/vactomas/ms_camera_model
Project-URL: Repository, https://github.com/vactomas/ms_camera_model
Project-URL: Issues, https://github.com/vactomas/ms_camera_model/issues
Project-URL: Changelog, https://github.com/vactomas/ms_camera_model
Description-Content-Type: text/markdown

# Multispectral Camera Simultation Model

This Python package offers a simple way of simulating a response of multispectral camera based on hyperspectral input.

To install this, run `pip install ms_camera_model`.

## Example simulation

```
import logging
import sys

import matplotlib.pyplot as plt

from ms_camera_model import (
    FilterSensorUnit,
    HyperspectralImageData,
    MultispectralCameraModel,
)
from ms_camera_model.image_visualiser import imshow

logging.basicConfig(level=logging.INFO,
                    format="%(asctime)s [%(levelname)s] -> %(message)s",
                    datefmt="%Y-%m-%d %H:%M:%S%p",
                    handlers=[logging.StreamHandler(sys.stdout)])

filter_paths = ["path/to/filter.xlsx"]

sensor_paths = ["path/to/sensor.xlsx"]

hs_path = "path/to/hyperspectral.hdr"
hs_data = HyperspectralImageData.import_hs_img(hs_path)

band_names = ["band1"]

fs_units = []

for i in range(len(filter_paths)):
    fs_unit = FilterSensorUnit.from_excel(filter_paths[i], sensor_paths[i])
    fs_units.append(fs_unit)

ms_cam_model = MultispectralCameraModel.create_model(hs_data, fs_units, band_names)
ms_cam_model.run_simulation()

imshow(ms_cam_model.out_data, [0])
plt.show()
```
