公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.visualize
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
生成图像的 RGB 或灰度可视化效果。增益、偏差、最小值、最大值和 Gamma 实参均可采用单个值(将应用于所有波段)或与波段长度相同的列表。
用法 | 返回 |
---|
Image.visualize(bands, gain, bias, min, max, gamma, opacity, palette, forceRgbOutput) | 图片 |
参数 | 类型 | 详细信息 |
---|
此:image | 图片 | 要可视化的图片。 |
bands | 对象,默认值:null | 要可视化的频段列表。如果为空,则使用前 3 个。 |
gain | 对象,默认值:null | 要使用的可视化增益。 |
bias | 对象,默认值:null | 要使用的可视化偏差。 |
min | 对象,默认值:null | 要映射到 RGB8 值 0 的值。 |
max | 对象,默认值:null | 要映射到 RGB8 值 255 的值。 |
gamma | 对象,默认值:null | 要使用的伽玛校正系数。 |
opacity | 数字,默认值:null | 要使用的不透明度缩放比例。 |
palette | 对象,默认值:null | 要使用的调色板。CSS 颜色标识符或十六进制颜色字符串的列表(例如,['red', '00FF00', 'blueviolet'])。 |
forceRgbOutput | 布尔值,默认值:false | 是否即使对于单波段输入也要生成 RGB 输出。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eVisualizes an image in RGB or grayscale by adjusting gain, bias, min/max values, and gamma correction for specified or default bands.\u003c/p\u003e\n"],["\u003cp\u003eAccepts single values or lists for gain, bias, min, max, and gamma to apply to all or individual bands, respectively.\u003c/p\u003e\n"],["\u003cp\u003eOffers customization options including opacity, a color palette for multi-band visualization, and forced RGB output.\u003c/p\u003e\n"],["\u003cp\u003eUses a list of CSS color identifiers or hexadecimal color strings for the palette parameter when visualizing multi-band images.\u003c/p\u003e\n"],["\u003cp\u003eOperates on an input image and returns a modified image with the specified visualization parameters applied.\u003c/p\u003e\n"]]],["The `Image.visualize` function generates an RGB or grayscale image visualization. It accepts arguments like `gain`, `bias`, `min`, `max`, and `gamma`, which can be applied to all bands or to individual bands specified in a list. Users can select specific `bands` to visualize or use the first three by default. The `opacity` controls scaling, and a `palette` allows for color customization. `forceRgbOutput` enables RGB output for single-band images.\n"],null,["# ee.Image.visualize\n\nProduces an RGB or grayscale visualization of an image. Each of the gain, bias, min, max and gamma arguments can take either a single value, which will be applied to all bands, or a list of values the same length as bands.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------------------------------------------------------------------------------------------|---------|\n| Image.visualize`(`*bands* `, `*gain* `, `*bias* `, `*min* `, `*max* `, `*gamma* `, `*opacity* `, `*palette* `, `*forceRgbOutput*`)` | Image |\n\n| Argument | Type | Details |\n|------------------|-------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The image to visualize. |\n| `bands` | Object, default: null | A list of the bands to visualize. If empty, the first 3 are used. |\n| `gain` | Object, default: null | The visualization gain(s) to use. |\n| `bias` | Object, default: null | The visualization bias(es) to use. |\n| `min` | Object, default: null | The value(s) to map to RGB8 value 0. |\n| `max` | Object, default: null | The value(s) to map to RGB8 value 255. |\n| `gamma` | Object, default: null | The gamma correction factor(s) to use. |\n| `opacity` | Number, default: null | The opacity scaling factor to use. |\n| `palette` | Object, default: null | The color palette to use. List of CSS color identifiers or hexadecimal color strings (e.g., \\['red', '00FF00', 'blueviolet'\\]). |\n| `forceRgbOutput` | Boolean, default: false | Whether to produce RGB output even for single-band inputs. |"]]