ImageDemosaic[image,cfa]
reconstructs a color image using the specified color filter array cfa.
ImageDemosaic[image,{"cfa",{row,col}}]
aligns the top-left pixel of the pattern with the {row,col} pixel of image.


ImageDemosaic
ImageDemosaic[image,cfa]
reconstructs a color image using the specified color filter array cfa.
ImageDemosaic[image,{"cfa",{row,col}}]
aligns the top-left pixel of the pattern with the {row,col} pixel of image.
Details and Options

- ImageDemosaic[image,…] works only with single channel images and generates a color image.
- The color filter array cfa can be any of the following:
-
"cfa" uses an explicit color filter array with zero offset {"cfa",{row,col}} aligning the top-left pixel of "cfa" with {row,col} - Possible "cfa" settings are:
-
"RGGB", "Bayer" "CYGM" "CYGM2" "LRGB"
Examples
open all close allRelated Guides
History
Text
Wolfram Research (2012), ImageDemosaic, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageDemosaic.html.
CMS
Wolfram Language. 2012. "ImageDemosaic." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ImageDemosaic.html.
APA
Wolfram Language. (2012). ImageDemosaic. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageDemosaic.html
BibTeX
@misc{reference.wolfram_2025_imagedemosaic, author="Wolfram Research", title="{ImageDemosaic}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/ImageDemosaic.html}", note=[Accessed: 18-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_imagedemosaic, organization={Wolfram Research}, title={ImageDemosaic}, year={2012}, url={https://reference.wolfram.com/language/ref/ImageDemosaic.html}, note=[Accessed: 18-August-2025]}