ee.Algorithms.HoughTransform
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הפונקציה מחילה את טרנספורמציית האף על תמונה. לכל פס קלט, המערכת מוציאה פס שבו הקווים מזוהים על ידי סף של טרנספורמציית האף עם ערך של lineThreshold. שם פס הפלט הוא [input]_lines, כאשר [input] הוא השם של פס המקור. ערכי ברירת המחדל שמוגדרים לפרמטרים נועדו לשמש כנקודת התחלה לשימוש בתמונות UINT8.
שימוש | החזרות |
---|
ee.Algorithms.HoughTransform(image, gridSize, inputThreshold, lineThreshold, smooth) | תמונה |
ארגומנט | סוג | פרטים |
---|
image | תמונה | התמונה שעליה רוצים להחיל את הטרנספורמציה. |
gridSize | מספר שלם, ברירת מחדל: 256 | גודל הרשת שעליה יתבצע החישוב. |
inputThreshold | מספר ממשי (float), ברירת מחדל: 64 | ערך הסף לתמונת הקלט. פיקסלים שערכם שווה לערך הזה או גבוה ממנו נחשבים פעילים. |
lineThreshold | מספר ממשי (float), ברירת מחדל: 72 | הסף לזיהוי קווים. ערכים ששווים לסף הזה או גבוהים ממנו בטרנספורמציית האף נחשבים לקווים שזוהו. |
smooth | בוליאני, ברירת מחדל: true | האם להחליק את טרנספורמציית האף לפני זיהוי הקו. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 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. |"]]