ee.Algorithms.HoughTransform
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Áp dụng phép biến đổi Hough cho một hình ảnh. Đối với mỗi dải đầu vào, sẽ xuất ra một dải trong đó các đường thẳng được phát hiện bằng cách ngưỡng biến đổi Hough với giá trị lineThreshold. Dải đầu ra có tên là [input]_lines, trong đó [input] là tên của dải ban đầu. Các giá trị mặc định được cung cấp cho các tham số này được dùng làm điểm bắt đầu để sử dụng với hình ảnh UINT8.
Cách sử dụng | Giá trị trả về |
---|
ee.Algorithms.HoughTransform(image, gridSize, inputThreshold, lineThreshold, smooth) | Hình ảnh |
Đối số | Loại | Thông tin chi tiết |
---|
image | Hình ảnh | Hình ảnh mà bạn muốn áp dụng phép biến đổi. |
gridSize | Số nguyên, mặc định: 256 | Kích thước của lưới để thực hiện phép tính. |
inputThreshold | Số thực, mặc định: 64 | Ngưỡng giá trị cho hình ảnh đầu vào. Những pixel bằng hoặc lớn hơn giá trị này được coi là đang hoạt động. |
lineThreshold | Độ chính xác đơn, mặc định: 72 | Ngưỡng phát hiện đường kẻ. Các giá trị bằng hoặc cao hơn ngưỡng này trên phép biến đổi Hough được coi là các đường thẳng được phát hiện. |
smooth | Boolean, mặc định: true | Có làm mịn phép biến đổi Hough trước khi phát hiện đường thẳng hay không. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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. |"]]