お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
ee.Image.reduceConnectedComponents
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
各「オブジェクト」内のすべてのピクセルにリデューサーを適用します。ピクセルは、接続(8 方向)されていて、ラベルバンドの値が同じである場合、オブジェクトに属していると見なされます。ラベルバンドは接続性を識別するためにのみ使用され、残りの部分はリデューサーへの入力として提供されます。
用途 | 戻り値 |
---|
Image.reduceConnectedComponents(reducer, labelBand, maxSize) | 画像 |
引数 | タイプ | 詳細 |
---|
これ: image | 画像 | 入力画像。 |
reducer | レデューサ | 接続されたコンポーネント内のピクセルに適用するリデューサー。 |
labelBand | 文字列、デフォルト: null | 接続性を検出するために使用する帯域の名前。指定しない場合、最初の帯域が使用されます。 |
maxSize | 整数、デフォルト: 256 | 値を集計する際に考慮する近傍のサイズ。水平方向または垂直方向のいずれかのサイズが maxSize を超えるオブジェクトは、オブジェクトの一部が近傍の外側にある可能性があるため、マスクされます。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eReduces pixel values within connected regions (objects) of an image based on a user-provided reducer function.\u003c/p\u003e\n"],["\u003cp\u003eObjects are identified by contiguous pixels sharing the same value in a specified label band (defaults to the first band if not provided).\u003c/p\u003e\n"],["\u003cp\u003eThe reducer function receives all image bands except the label band as input and aggregates pixel values within each object.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003emaxSize\u003c/code\u003e parameter limits the size of objects considered for reduction, masking larger objects to avoid edge effects.\u003c/p\u003e\n"]]],[],null,["# ee.Image.reduceConnectedComponents\n\nApplies a reducer to all of the pixels inside of each 'object'. Pixels are considered to belong to an object if they are connected (8-way) and have the same value in the 'label' band. The label band is only used to identify the connectedness; the rest are provided as inputs to the reducer.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------------------------------|---------|\n| Image.reduceConnectedComponents`(reducer, `*labelBand* `, `*maxSize*`)` | Image |\n\n| Argument | Type | Details |\n|---------------|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The input image. |\n| `reducer` | Reducer | The reducer to apply to pixels within the connected component. |\n| `labelBand` | String, default: null | The name of the band to use to detect connectedness. If unspecified, the first band is used. |\n| `maxSize` | Integer, default: 256 | Size of the neighborhood to consider when aggregating values. Any objects larger than maxSize in either the horizontal or vertical dimension will be masked, since portions of the object might be outside of the neighborhood. |"]]