ee.Algorithms.CannyEdgeDetector
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 thuật toán phát hiện cạnh Canny cho một hình ảnh. Đầu ra là một hình ảnh có các dải có cùng tên với các dải đầu vào, trong đó các giá trị khác 0 cho biết các cạnh và độ lớn của giá trị là độ lớn của độ dốc.
Cách sử dụng | Giá trị trả về |
---|
ee.Algorithms.CannyEdgeDetector(image, threshold, sigma) | 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 tính năng phát hiện cạnh. |
threshold | Số thực dấu phẩy động | Giá trị ngưỡng. Pixel chỉ được xem xét để phát hiện cạnh nếu độ lớn của độ dốc cao hơn ngưỡng này. |
sigma | Số thực, mặc định: 1 | Giá trị sigma cho bộ lọc Gaussian được áp dụng trước khi phát hiện cạnh. 0 nghĩa là không áp dụng bộ lọc nào. |
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\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. |"]]