ee.Image.focalMode
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Stosuje filtr morphologicalReducer() do każdego pasma obrazu za pomocą nazwanego lub niestandardowego jądra.
Wykorzystanie | Zwroty |
---|
Image.focalMode(radius, kernelType, units, iterations, kernel) | Obraz |
Argument | Typ | Szczegóły |
---|
to: image | Obraz | Obraz, do którego mają być zastosowane operacje. |
radius | Liczba zmiennoprzecinkowa, domyślnie: 1,5 | Promień jądra, którego chcesz użyć. |
kernelType | Ciąg znaków, domyślnie: „circle” | Typ jądra, którego chcesz użyć. Dostępne opcje to: „circle” (okrąg), „square” (kwadrat), „cross” (krzyżyk), „plus” (plus), „octagon” (ośmiokąt) i „diamond” (romb). |
units | Ciąg znaków, domyślnie: „pixels” | Jeśli jądro nie zostanie określone, ten parametr określa, czy jądro jest podane w metrach czy w pikselach. |
iterations | Liczba całkowita, domyślnie: 1 | Liczba zastosowań danego jądra. |
kernel | Jądro, domyślnie: null | niestandardowe jądro, Jeśli jest używany, parametry kernelType i radius są ignorowane. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eApplies a morphological reducer filter to each band of an image using a pre-defined or custom kernel.\u003c/p\u003e\n"],["\u003cp\u003eThe filter can be customized using parameters such as radius, kernel type, units, and iterations.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define their own kernel, overriding the default options of kernel type and radius.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns a modified image after applying the specified operations.\u003c/p\u003e\n"]]],["The `focalMode()` function applies a morphological reducer filter to an image's bands. It uses a specified `kernelType` (circle, square, etc.) or a custom `kernel`, with a defined `radius` and measurement `units` (pixels or meters). The operation can be repeated `iterations` times. If a custom `kernel` is provided, the `kernelType` and `radius` are ignored. The function returns a new image with the filter applied.\n"],null,["# ee.Image.focalMode\n\nApplies a morphological reducer() filter to each band of an image using a named or custom kernel.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------------------------------------------------------------|---------|\n| Image.focalMode`(`*radius* `, `*kernelType* `, `*units* `, `*iterations* `, `*kernel*`)` | Image |\n\n| Argument | Type | Details |\n|---------------|---------------------------|------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The image to which to apply the operations. |\n| `radius` | Float, default: 1.5 | The radius of the kernel to use. |\n| `kernelType` | String, default: \"circle\" | The type of kernel to use. Options include: 'circle', 'square', 'cross', 'plus', 'octagon', and 'diamond'. |\n| `units` | String, default: \"pixels\" | If a kernel is not specified, this determines whether the kernel is in meters or pixels. |\n| `iterations` | Integer, default: 1 | The number of times to apply the given kernel. |\n| `kernel` | Kernel, default: null | A custom kernel. If used, kernelType and radius are ignored. |"]]