Demosaicing Algorithm for Sony IMX250MYR

Demosaicing algorithm to demosaic colour polarization filter array images (for ex. from SONY IMX250MYR sensor)
63 Downloads
Updated 9 Mar 2024

Demosaicing-CPFA-LMMSE

This code allow you to demosaic a colour and polarimetric image from a filter array sensor with the Linear Minimum Mean Square Error demosaicing algorithm. The arrangement is the QuadBayer polarization pattern from the SONY IMX250MYR sensor. The monochrome version of this code is at : https://fr.mathworks.com/matlabcentral/fileexchange/131758-demosaicing-algorithm-for-sony-imx250-mzr/?s_tid=LandingPageTabfx. This code can also be applied to SONY IMX264MYR or IMX253MYR. 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".
  • 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 IMX250MYR (https://github.com/pjlapray/LMMSE-Demosaicing-for-Colour-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

Spote, Alexandra, et al. “Joint Demosaicing of Colour and Polarisation from Filter Arrays.” Color and Imaging Conference, vol. 29, no. 1, Society for Imaging Science & Technology, Nov. 2021, pp. 288–93, doi:10.2352/issn.2169-2629.2021.29.288.

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0

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

1.0.0

See release notes for this release on GitHub: https://github.com/pjlapray/LMMSE-Demosaicing-for-Colour-Polarization-Filter-Array/releases/tag/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.