公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Algorithms.CannyEdgeDetector
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
對圖片套用 Canny 邊緣偵測演算法。輸出結果為圖片,其中的波段與輸入波段的名稱相同,且非零值表示邊緣,值的大小則是梯度大小。
用量 | 傳回 |
---|
ee.Algorithms.CannyEdgeDetector(image, threshold, sigma) | 圖片 |
引數 | 類型 | 詳細資料 |
---|
image | 圖片 | 要套用邊緣偵測的圖片。 |
threshold | 浮點值 | 門檻值。只有在漸層大小高於這個門檻時,系統才會將像素納入邊緣偵測。 |
sigma | 浮點值,預設值為 1 | 邊緣偵測前套用的高斯濾鏡 Sigma 值。0 代表不套用任何篩選條件。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eIdentifies edges within an image by calculating gradient magnitude and applying a threshold.\u003c/p\u003e\n"],["\u003cp\u003eReturns an image where non-zero values represent edges, and the magnitude of the value corresponds to the gradient magnitude.\u003c/p\u003e\n"],["\u003cp\u003eOffers customization options through a threshold for gradient magnitude and a sigma value for pre-filtering.\u003c/p\u003e\n"]]],[],null,["# ee.Algorithms.CannyEdgeDetector\n\nApplies the Canny edge detection algorithm to an image. The output is an image whose bands have the same names as the input bands, and in which non-zero values indicate edges, and the magnitude of the value is the gradient magnitude.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------------------------|---------|\n| `ee.Algorithms.CannyEdgeDetector(image, threshold, `*sigma*`)` | Image |\n\n| Argument | Type | Details |\n|-------------|-------------------|---------------------------------------------------------------------------------------------------------------------------|\n| `image` | Image | The image on which to apply edge detection. |\n| `threshold` | Float | Threshold value. The pixel is only considered for edge detection if the gradient magnitude is higher than this threshold. |\n| `sigma` | Float, default: 1 | Sigma value for a gaussian filter applied before edge detection. 0 means apply no filtering. |"]]