公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Reducer.fixedHistogram
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
创建一个 reducer,该 reducer 将使用固定数量的固定宽度箱来计算输入的直方图。系统会忽略 [min, max) 范围之外的值。输出是一个 Nx2 数组,包含分桶下边缘和数量(或累计数量),适合按像素使用。
用法 | 返回 |
---|
ee.Reducer.fixedHistogram(min, max, steps, cumulative) | 缩减器 |
参数 | 类型 | 详细信息 |
---|
min | 浮点数 | 第一个分桶的下限(含)。 |
max | 浮点数 | 最后一个分桶的上限(不含)。 |
steps | 整数 | 要使用的分桶数量。 |
cumulative | 布尔值,默认值:false | 如果为 true,则生成累积直方图。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):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. |"]]