ee.Image.fastDistanceTransform
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מחזירה את המרחק, כפי שנקבע על ידי מדד המרחק שצוין, לפיקסל הקרוב ביותר שערכו שונה מאפס בקלט. הפלט מכיל ערכים לכל הפיקסלים בגודל השכונה הנתון, ללא קשר למסכת הקלט. הערה: מדד המרחק שמוגדר כברירת מחדל מחזיר את המרחק בריבוע.
שימוש | החזרות |
---|
Image.fastDistanceTransform(neighborhood, units, metric) | תמונה |
ארגומנט | סוג | פרטים |
---|
זה: image | תמונה | תמונת הקלט. |
neighborhood | מספר שלם, ברירת מחדל: 256 | גודל השכונה בפיקסלים. |
units | מחרוזת, ברירת מחדל: 'פיקסלים' | יחידות השכונה, נכון לעכשיו יש תמיכה רק בפיקסלים. |
metric | מחרוזת, ברירת מחדל: squared_euclidean | מדד המרחק לשימוש: האפשרויות הן squared_euclidean, manhattan או chebyshev. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003eCalculates the distance to the closest non-zero pixel for every pixel in an image, considering a specified neighborhood and distance metric.\u003c/p\u003e\n"],["\u003cp\u003eProvides flexibility in choosing neighborhood size, measurement units (currently only pixels), and distance metric (squared Euclidean, Manhattan, or Chebyshev).\u003c/p\u003e\n"],["\u003cp\u003eOutputs an image where each pixel value represents the calculated distance to its nearest non-zero pixel, including areas outside the input mask.\u003c/p\u003e\n"],["\u003cp\u003eDefaults to a neighborhood size of 256 pixels, uses pixels as the unit of measurement, and employs the squared Euclidean distance metric.\u003c/p\u003e\n"]]],[],null,["# ee.Image.fastDistanceTransform\n\nReturns the distance, as determined by the specified distance metric, to the nearest non-zero valued pixel in the input. The output contains values for all pixels within the given neighborhood size, regardless of the input's mask. Note: the default distance metric returns squared distance.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------------------------------|---------|\n| Image.fastDistanceTransform`(`*neighborhood* `, `*units* `, `*metric*`)` | Image |\n\n| Argument | Type | Details |\n|----------------|--------------------------------------|--------------------------------------------------------------------------------------------|\n| this: `image` | Image | The input image. |\n| `neighborhood` | Integer, default: 256 | Neighborhood size in pixels. |\n| `units` | String, default: \"pixels\" | The units of the neighborhood, currently only 'pixels' are supported. |\n| `metric` | String, default: \"squared_euclidean\" | Distance metric to use: options are \\`squared_euclidean\\`, \\`manhattan\\` or \\`chebyshev\\`. |"]]