Demosaic

A package with functions that help demosaicing images with polarisation and Bayer-RGB or mono filter arrays. It includes implementations of different algorithms, such as:
- Bilinear interpolation
- Malvar interpolation (Malvar et al., 2024)
- Fourier interpolation (Hagen et al., 2024)
It also contains a module for combining images with different exposures into a single HDR image.
References
- Malvar, H. S., He, L.-W. & Cutler, R. High-Quality Linear Interpolation for Demosaicing of Bayer-Patterned Color Images. 2004 IEEE Int. Conf. Acoust., Speech, Signal Process. 3, III-485-III–488 (2004).
- Hagen, N., Stockmans, T., Otani, Y. & Buranasiri, P. Fourier-domain filtering analysis for color-polarization camera demosaicking. Appl. Opt. 63, 2314 (2024).
Installation
You can easily install the package by using pip as:
pip install git+https://github.com/evgkanias/demosaic.git
Alternatively you need to clone the GitHub repository, navigate to the main directory of the project, install the dependencies and finally the package itself. Here is an example code that installs the package:
- Clone this repo.
mkdir ~/src
cd ~/src
git clone https://github.com/evgkanias/demosaic.git
cd sky
- Install the required libraries.
-
using pip :
pip install -r requirements.txt
-
using conda :
conda env create -f environment.yml conda activate demosaic-env
-
- Install the package.
- using pip :
pip install .
- using conda :
conda install .
- using pip :
Note that the pip project might be needed for the above installation.
Report an issue
If you have any issues installing or using the package, you can report it here.
Author
The code is written by Evripidis Gkanias.
Copyright
Copyright © 2026, Evripidis Gkanias; Lund Vision Group; Lund University.
Metadata
Release files for demosaic 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| demosaic-1.1.3.tar.gz | 31.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| demosaic-1.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.7 kB
Release files / demosaic-1.1.3.tar.gz
| Download URL | demosaic-1.1.3.tar.gz |
|---|---|
| Size | 31.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4c299e84f30bbfdac620ef154a296166215186fa4f798706986123cc7f3495f
|
|
BLAKE2b-256 checksum How to use checksums |
d444e4d4380f897ba0e0f3dd5faa369d86de409514d4d261b1a4b0c25ef49770
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / demosaic-1.1.3-py3-none-any.whl
| Download URL | demosaic-1.1.3-py3-none-any.whl |
|---|---|
| Size | 31.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1970fd72e77ce048496a47c367f5d37e31b1b35c5bc8d9b6dd9a3b50111a64d5
|
|
BLAKE2b-256 checksum How to use checksums |
1038056b6d89f18d638f438407ed0e2530622802a21a7da7bd852b3dd73c40ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|