{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This method is sometimes referred to as \"area-based\" interpolation or \"pixel mixing\" interpolation "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". When "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "grid_mode"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is True, it is equivalent to using OpenCV's resize with "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "INTER_AREA",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " interpolation mode. It is commonly used for image downsizing. If the downsizing factors are integers, then "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "downscale_local_mean",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "skimage.transform._warps:downscale_local_mean"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " should be preferred instead."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "resized",
              "annotation": "ndarray",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Resized version of the input."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Resize an array with the local mean / bilinear scaling."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "image",
              "annotation": "ndarray",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Input image. If this is a multichannel image, the axis corresponding to channels should be specified using "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "channel_axis"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "output_shape",
              "annotation": "iterable",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Size of the generated output image. When "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "channel_axis"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is not None, the "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "channel_axis"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " should either be omitted from "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "output_shape"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "output_shape[channel_axis]"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " must match "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "image.shape[channel_axis]"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". If the length of "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "output_shape"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " exceeds image.ndim, additional singleton dimensions will be appended to the input "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "image"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " as needed."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "grid_mode",
              "annotation": "bool, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Defines "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "image"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " pixels position: if True, pixels are assumed to be at grid intersections, otherwise at cell centers. As a consequence, for example, a 1d signal of length 5 is considered to have length 4 when "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "grid_mode"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is False, but length 5 when "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "grid_mode"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is True. See the following visual illustration:"
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "| pixel 1 | pixel 2 | pixel 3 | pixel 4 | pixel 5 |\n     |<-------------------------------------->|\n                        vs.\n|<----------------------------------------------->|",
                  "execution_status": null
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The starting point of the arrow in the diagram above corresponds to coordinate location 0 in each mode."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "preserve_range",
              "annotation": "bool, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "img_as_float",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "skimage.util.dtype:img_as_float"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Also see https://scikit-image.org/docs/dev/user_guide/data_types.html"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Returns",
    "Yields",
    "Receives",
    "Raises",
    "Warns",
    "Other Parameters",
    "Attributes",
    "Methods",
    "Notes",
    "Warnings"
  ],
  "item_file": "/dev/scikit-image/src/skimage/transform/_warps.py",
  "item_line": 1290,
  "item_type": "function",
  "aliases": [
    "skimage.transform.resize_local_mean"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "from skimage import data\nfrom skimage.transform import resize_local_mean\nimage = data.camera()\nresize_local_mean(image, (100, 100)).shape\n",
        "execution_status": "success"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "downscale_local_mean",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "skimage.transform._warps:downscale_local_mean"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "resize",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "skimage.transform._warps:resize"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    }
  ],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "image",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "output_shape",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "grid_mode",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "True"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "preserve_range",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "False"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "channel_axis",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "resize_local_mean"
  },
  "references": [
    ".. [1] http://entropymine.com/imageworsener/pixelmixing/"
  ],
  "qa": "skimage.transform._warps:resize_local_mean",
  "arbitrary": [],
  "local_refs": [
    "grid_mode",
    "image",
    "output_shape",
    "preserve_range",
    "resized"
  ]
}