Demosaicing Algorithm for Sony IMX250MZR

Demosaicing algorithm to demosaic polarization filter array images (for ex. from SONY IMX250MZR sensor)
57 Downloads
Updated 15 Mar 2024

Demosaicing-PFA-LMMSE

This code allow you to demosaic a polarimetric image from a filter array sensor with the Linear Minimum Mean Square Error demosaicing algorithm. The arrangement is the Chun polarization pattern from the SONY IMX250MZR sensor. This code can also be applied to SONY IMX264MZR or IMX253MZR. The code will be readapted for any square arrangement in a future release.

The LMMSE demosaicing algorithm is a learning-based technique. The initial training (matrix 'D_matrix.mat' in Data folder) is done with the data used in the publication (training with 12 images from the Wen et al. database). If using the code, please cite these publications:

1- Dumoulin R., Lapray P.-J., Thomas J.-B., Farup I., Impact of training data on LMMSE demosaicing for Colour-Polarization Filter Array, 16th International Conference on Signal-Image Technology & Internet-Based Systems (SITIS), 2022, Dijon, France.

2- Spote A., Lapray P.-J., Thomas J.-B., Farup I., Joint demosaicing of colour and polarisation from filter arrays, In 29th Color and Imaging Conference Final Program and Proceedings 2021, Society for Imaging Science and Technology, 2021.

Two scripts are provided as demonstration:

  • The script to use for demosaicing with the furbished pre-trained matrix D is "Script_LMMSE_Demosaicing.m".
  • If you may want to retrain the demosaicing matrix with your own specific data, use the Script named "Script_LMMSE_retraining.m". Please use the same image structure as in "Data/Dataset". It is recommanded to train with sufficient data (at least 12 images of resolution 1456 × 1088 pixels, see our conference paper from 2022 for more information).

The "Data" folder contains a mosaiced image, a matrix used for demosaicing, along woth a dataset in case of retraining matrix D with the script "Script_LMMSE_retraining.m".

The "Function" folder contains Matlab functions needed for retraining.

Cite As

Pierre-Jean Lapray (2026). Demosaicing Algorithm for Sony IMX250MZR (https://github.com/pjlapray/LMMSE-Demosaicing-for-Polarization-Filter-Array/releases/tag/1.1.0), GitHub. Retrieved .

Dumoulin, Ronan, et al. “Impact of Training Data on LMMSE Demosaicing for Colour-Polarization Filter Array.” 2022 16th International Conference on Signal-Image Technology &Amp\Mathsemicolon Internet-Based Systems (SITIS), IEEE, 2022, doi:10.1109/sitis57111.2022.00031.

View more styles
MATLAB Release Compatibility
Created with R2023a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.1.0

See release notes for this release on GitHub: https://github.com/pjlapray/LMMSE-Demosaicing-for-Polarization-Filter-Array/releases/tag/1.1.0

1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.