公告:凡是在
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 | 要使用的 Gamma 校正係數。 |
opacity | 數字,預設值:null | 要使用的不透明度縮放比例係數。 |
palette | 物件,預設值:null | 要使用的調色盤。CSS 顏色 ID 或十六進位顏色字串清單 (例如 ['red', '00FF00', 'blueviolet'])。 |
forceRgbOutput | 布林值,預設值為 false | 是否要為單一頻帶輸入內容產生 RGB 輸出內容。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]