公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Reducer.fixedHistogram
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
建立 reducer,使用固定數量的固定寬度 bin 計算輸入內容的直方圖。系統會忽略 [min, max) 範圍以外的值。輸出內容為值區下緣和計數 (或累計計數) 的 Nx2 陣列,適合用於每個像素。
用量 | 傳回 |
---|
ee.Reducer.fixedHistogram(min, max, steps, cumulative) | 縮減函式 |
引數 | 類型 | 詳細資料 |
---|
min | 浮點值 | 第一個值區的下限 (含)。 |
max | 浮點值 | 最後一個 bucket 的上限 (不含)。 |
steps | 整數 | 要使用的 bucket 數量。 |
cumulative | 布林值,預設值為 false | 如果為 true,則會產生累積直方圖。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eGenerates a histogram with a fixed number of bins within a specified range (min, max).\u003c/p\u003e\n"],["\u003cp\u003eIgnores values outside the defined range and is suitable for per-pixel operations.\u003c/p\u003e\n"],["\u003cp\u003eOutputs a Nx2 array containing bucket lower edges and counts (or cumulative counts).\u003c/p\u003e\n"],["\u003cp\u003eOffers flexibility to generate cumulative histograms using the 'cumulative' parameter.\u003c/p\u003e\n"],["\u003cp\u003eCan be easily applied per-pixel for detailed image analysis.\u003c/p\u003e\n"]]],[],null,["# ee.Reducer.fixedHistogram\n\nCreates a reducer that will compute a histogram of the inputs using a fixed number of fixed width bins. Values outside of the \\[min, max) range are ignored. The output is a Nx2 array of bucket lower edges and counts (or cumulative counts) and is suitable for use per-pixel.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------------------|---------|\n| `ee.Reducer.fixedHistogram(min, max, steps, `*cumulative*`)` | Reducer |\n\n| Argument | Type | Details |\n|--------------|-------------------------|--------------------------------------------------|\n| `min` | Float | The lower (inclusive) bound of the first bucket. |\n| `max` | Float | The upper (exclusive) bound of the last bucket. |\n| `steps` | Integer | The number of buckets to use. |\n| `cumulative` | Boolean, default: false | When true, generates a cumulative histogram. |"]]