ee.Image.fastDistanceTransform
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
فاصله را، همانطور که توسط متریک فاصله مشخص شده تعیین میشود، به نزدیکترین پیکسل با مقدار غیر صفر در ورودی برمیگرداند. خروجی حاوی مقادیری برای همه پیکسل ها در اندازه همسایگی معین است، صرف نظر از ماسک ورودی. توجه: متریک فاصله پیشفرض مجذور فاصله را برمیگرداند.
استفاده | برمی گرداند | Image. fastDistanceTransform ( neighborhood , units , metric ) | تصویر |
استدلال | تایپ کنید | جزئیات | این: image | تصویر | تصویر ورودی |
neighborhood | عدد صحیح، پیش فرض: 256 | اندازه همسایگی بر حسب پیکسل |
units | رشته، پیش فرض: "pixels" | واحدهای محله، در حال حاضر فقط «پیکسل» پشتیبانی می شوند. |
metric | رشته، پیشفرض: "squared_euclidean" | متریک فاصله برای استفاده: گزینهها «مربع_اقلیدسی»، «منهتن» یا «چبیشف» هستند. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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\\`. |"]]