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 allclose all

Basic Examples  (1)

Reconstruct an image from raw CCD data:

Scope  (1)

Demosaic using a specific color function array and offset:

Applications  (1)

Demosaic an astronomical image:

Possible Issues  (1)

Demosaicing with a wrong offset results in a wrong reconstruction:

Result of the reconstruction with the correct offset:

Wolfram Research (2012), ImageDemosaic, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageDemosaic.html.

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_2024_imagedemosaic, author="Wolfram Research", title="{ImageDemosaic}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/ImageDemosaic.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_imagedemosaic, organization={Wolfram Research}, title={ImageDemosaic}, year={2012}, url={https://reference.wolfram.com/language/ref/ImageDemosaic.html}, note=[Accessed: 21-December-2024 ]}