公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Algorithms.HoughTransform
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
将 Hough 转换应用于图像。对于每个输入频段,输出一个频段,其中通过对 Hough 转换进行阈值处理(阈值为 lineThreshold)来检测直线。输出波段的名称为 [输入]_lines,其中 [输入] 是原始波段的名称。为参数提供的默认值旨在作为使用 UINT8 映像的起点。
用法 | 返回 |
---|
ee.Algorithms.HoughTransform(image, gridSize, inputThreshold, lineThreshold, smooth) | 图片 |
参数 | 类型 | 详细信息 |
---|
image | 图片 | 要应用转换的图片。 |
gridSize | 整数,默认值:256 | 要执行计算的网格的大小。 |
inputThreshold | 浮点数,默认值:64 | 输入图片的价值阈值。等于或高于此值的像素被视为有效像素。 |
lineThreshold | 浮点数,默认值:72 | 用于检测直线的阈值。Hough 转换中等于或高于此阈值的值被视为检测到的直线。 |
smooth | 布尔值,默认值:true | 是否在检测直线之前平滑 Hough 转换。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eDetects lines in an image by applying the Hough transform and thresholding the results.\u003c/p\u003e\n"],["\u003cp\u003eOutputs a new band for each input band, highlighting detected lines, named "[input]_lines".\u003c/p\u003e\n"],["\u003cp\u003eCustomizable parameters include grid size, input and line thresholds, and smoothing for the Hough transform.\u003c/p\u003e\n"],["\u003cp\u003eDefault parameter values are optimized for 8-bit unsigned integer images.\u003c/p\u003e\n"],["\u003cp\u003eUsers can adjust these parameters to fine-tune line detection for their specific images and use cases.\u003c/p\u003e\n"]]],["The Hough transform detects lines in an image. It takes an image as input and outputs a new image with detected lines for each band, named `[input]_lines`. Key actions include thresholding the input image based on `inputThreshold` to identify active pixels and then thresholding the Hough transform output with `lineThreshold` to detect lines. `gridSize` controls the computation grid, and `smooth` enables smoothing before line detection. Defaults are provided for UINT8 images.\n"],null,["# ee.Algorithms.HoughTransform\n\nApplies the Hough transform to an image. For every input band, outputs a band where lines are detected by thresholding the Hough transform with a value of lineThreshold. The output band is named \\[input\\]_lines, where \\[input\\] is the name of the original band. The defaults provided for the parameters are intended as a starting point for use with UINT8 images.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------------------------------|---------|\n| `ee.Algorithms.HoughTransform(image, `*gridSize* `, `*inputThreshold* `, `*lineThreshold* `, `*smooth*`)` | Image |\n\n| Argument | Type | Details |\n|------------------|------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `image` | Image | The image to which to apply the transform. |\n| `gridSize` | Integer, default: 256 | The size of the grid over which to perform the computation. |\n| `inputThreshold` | Float, default: 64 | Value threshold for input image. Pixels equal to or above this value are considered active. |\n| `lineThreshold` | Float, default: 72 | Threshold for line detection. Values equal to or above this threshold on the Hough transform are considered to be detected lines. |\n| `smooth` | Boolean, default: true | Whether to smooth the Hough transform before line detection. |"]]