"Image" (Net Decoder)

NetDecoder["Image"]

represents a decoder that converts a rank-3 tensor of pixel values to a 2D image.

NetDecoder[{"Image","param"val,}]

represents a decoder with specific parameters for post-processing.

Details

  • NetDecoder[][input] applies the decoder to an input to produce an output.
  • NetDecoder[][{input1,input2,}] applies the decoder to a list of inputs to produce a list of outputs.
  • The input to the decoder input is a rank-3 tensor of numeric values that lie between 0 and 1.
  • A decoder can be attached to an output port of a net by specifying "port"->NetDecoder[] when constructing the net.
  • Parameters
  • The following parameters are supported:
  • "ColorSpace""RGB"color space to use for encoding
    "MeanImage"Nonemean image to subtract
    "VarianceImage"Nonevariance image to normalize by
  • The parameter "ColorSpace" can take the same values as the ColorSpace option.
  • The following settings can be used for "MeanImage" and "VarianceImage":
  • Nonedo not subtract anything
    mvalue to subtract from each channel of each pixel
    {m1,m2,}values to be subtracted from different channels
    Image3D[]overall image to subtract
  • Pixels are normalized to lie between 0 and 1 before doing subtraction.

Examples

open allclose all

Basic Examples  (1)

Create an RGB image decoder:

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

Use it to decode a three-channel matrix as an RGB image:

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

Scope  (1)

See Also

NetDecoder  Image  ImageData  NetChain  NetGraph

Tutorials

Related NetEncoders

Related NetDecoders