ImageDemosaic

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

DetailsDetails

  • ImageDemosaic[image, ...] works only with single channel images and generates a color image.
  • ImageDemosaic[image, "cfa"] is equivalent to ImageDemosaic[image, {"cfa", {0, 0}}].
  • Possible settings are:
  • "RGGB", "Bayer"
    "CYGM"
    "CYGM2"
    "LRGB"

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Demosaic an astronomical image:

In[2]:=
Click for copyable input
Out[2]=

Demosaic using a specific color function array and offset:

In[1]:=
Click for copyable input
Out[1]=
New to Mathematica? Find your learning path »
Have a question? Ask support »