公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Algorithms.CannyEdgeDetector
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
对图片应用 Canny 边缘检测算法。输出是一张图片,其波段与输入波段具有相同的名称,其中非零值表示边缘,值的大小表示梯度大小。
用法 | 返回 |
---|
ee.Algorithms.CannyEdgeDetector(image, threshold, sigma) | 图片 |
参数 | 类型 | 详细信息 |
---|
image | 图片 | 要应用边缘检测的图片。 |
threshold | 浮点数 | 阈值。只有当梯度幅度高于此阈值时,像素才会被考虑用于边缘检测。 |
sigma | 浮点数,默认值:1 | 在边缘检测之前应用的高斯滤波器的 Sigma 值。0 表示不应用任何过滤条件。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):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. |"]]