공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.Kernel.fixed
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
커널을 만듭니다.
사용 | 반환 값 |
---|
ee.Kernel.fixed(width, height, weights, x, y, normalize) | 커널 |
인수 | 유형 | 세부정보 |
---|
width | 정수, 기본값: -1 | 커널의 너비(픽셀)입니다. |
height | 정수, 기본값: -1 | 커널의 높이(픽셀)입니다. |
weights | 목록 | 커널의 가중치로 사용할 [높이] x [너비] 값의 2D 목록입니다. |
x | 정수, 기본값: -1 | 초점의 위치입니다(왼쪽에서 오프셋으로 표시). |
y | 정수, 기본값: -1 | 초점의 위치입니다(상단에서 오프셋). |
normalize | 불리언, 기본값: false | 커널 값을 합계 1로 정규화합니다. |
예
코드 편집기 (JavaScript)
// Kernel weights.
var weights = [[4, 3, 2, 1, 2, 3, 4],
[4, 3, 2, 1, 2, 3, 4],
[4, 3, 2, 1, 2, 3, 4]];
print('A fixed kernel', ee.Kernel.fixed({weights: weights}));
/**
* Output weights matrix
*
* [4, 3, 2, 1, 2, 3, 4]
* [4, 3, 2, 1, 2, 3, 4]
* [4, 3, 2, 1, 2, 3, 4]
*/
Python 설정
Python API 및 geemap
를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
import ee
import geemap.core as geemap
Colab (Python)
from pprint import pprint
weights = [[4, 3, 2, 1, 2, 3, 4],
[4, 3, 2, 1, 2, 3, 4],
[4, 3, 2, 1, 2, 3, 4]]
print('A fixed kernel:')
pprint(ee.Kernel.fixed(**{'weights': weights}).getInfo())
# Output weights matrix
# [4, 3, 2, 1, 2, 3, 4]
# [4, 3, 2, 1, 2, 3, 4]
# [4, 3, 2, 1, 2, 3, 4]
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eCreates a kernel to be applied to an image, using a fixed set of weights provided in a 2-D list.\u003c/p\u003e\n"],["\u003cp\u003eThe kernel can be customized with dimensions (width, height), weight values, and a central focus point (x, y).\u003c/p\u003e\n"],["\u003cp\u003eOptionally, the kernel weights can be normalized to sum to 1.\u003c/p\u003e\n"],["\u003cp\u003eExamples in JavaScript, Python, and Colab are included to demonstrate how to create and use a fixed kernel.\u003c/p\u003e\n"]]],["The function `ee.Kernel.fixed` creates a kernel using specified parameters. Key actions involve defining the kernel's `width` and `height` in pixels and providing a 2-D list of `weights`. Users can specify the focus point using `x` and `y` offsets. An option to `normalize` the weights, ensuring they sum to 1, is available. The function then returns a `Kernel` object for use. Example `weights` data are shown.\n"],null,["# ee.Kernel.fixed\n\nCreates a Kernel.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------------------------------------------------------|---------|\n| `ee.Kernel.fixed(`*width* `, `*height* `, weights, `*x* `, `*y* `, `*normalize*`)` | Kernel |\n\n| Argument | Type | Details |\n|-------------|-------------------------|----------------------------------------------------------------------------------|\n| `width` | Integer, default: -1 | The width of the kernel in pixels. |\n| `height` | Integer, default: -1 | The height of the kernel in pixels. |\n| `weights` | List | A 2-D list of \\[height\\] x \\[width\\] values to use as the weights of the kernel. |\n| `x` | Integer, default: -1 | The location of the focus, as an offset from the left. |\n| `y` | Integer, default: -1 | The location of the focus, as an offset from the top. |\n| `normalize` | Boolean, default: false | Normalize the kernel values to sum to 1. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Kernel weights.\nvar weights = [[4, 3, 2, 1, 2, 3, 4],\n [4, 3, 2, 1, 2, 3, 4],\n [4, 3, 2, 1, 2, 3, 4]];\n\nprint('A fixed kernel', ee.Kernel.fixed({weights: weights}));\n\n/**\n * Output weights matrix\n *\n * [4, 3, 2, 1, 2, 3, 4]\n * [4, 3, 2, 1, 2, 3, 4]\n * [4, 3, 2, 1, 2, 3, 4]\n */\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nfrom pprint import pprint\n\nweights = [[4, 3, 2, 1, 2, 3, 4],\n [4, 3, 2, 1, 2, 3, 4],\n [4, 3, 2, 1, 2, 3, 4]]\n\nprint('A fixed kernel:')\npprint(ee.Kernel.fixed(**{'weights': weights}).getInfo())\n\n# Output weights matrix\n\n# [4, 3, 2, 1, 2, 3, 4]\n# [4, 3, 2, 1, 2, 3, 4]\n# [4, 3, 2, 1, 2, 3, 4]\n```"]]