ee.Image.spectralDistance
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
فاصله طیفی در هر پیکسل بین دو تصویر را محاسبه می کند. اگر تصاویر مبتنی بر آرایه باشند، تنها اولین باند هر تصویر استفاده می شود. در غیر این صورت همه باندها در محاسبه فاصله درگیر هستند. بنابراین انتظار می رود که دو تصویر دارای تعداد باندهای یکسانی باشند یا طول آرایه 1 بعدی یکسانی داشته باشند.
استفاده | برمی گرداند | Image. spectralDistance (image2, metric ) | تصویر |
استدلال | تایپ کنید | جزئیات | این: image1 | تصویر | تصویر اول. |
image2 | تصویر | تصویر دوم. |
metric | رشته، پیش فرض: "sam" | متریک فاصله طیفی برای استفاده یکی از "sam" (نقشه نگار زاویه طیفی)، "sid" (واگرایی اطلاعات طیفی)، "sed" (مربع فاصله اقلیدسی)، یا "emd" (فاصله جابجایی زمین). |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eComputes the spectral distance between two images on a per-pixel basis, considering either a single band or all bands depending on image type.\u003c/p\u003e\n"],["\u003cp\u003eImages must have the same number of bands or be 1-dimensional arrays of the same length.\u003c/p\u003e\n"],["\u003cp\u003eOffers various spectral distance metrics including SAM, SID, SED, and EMD, with SAM as the default.\u003c/p\u003e\n"],["\u003cp\u003eReturns a new image representing the calculated spectral distances.\u003c/p\u003e\n"],["\u003cp\u003eAccessible through the \u003ccode\u003espectralDistance()\u003c/code\u003e method applied to the first image, taking the second image and an optional metric as arguments.\u003c/p\u003e\n"]]],[],null,["# ee.Image.spectralDistance\n\nComputes the per-pixel spectral distance between two images. If the images are array based then only the first band of each image is used; otherwise all bands are involved in the distance computation. The two images are therefore expected to contain the same number of bands or have the same 1-dimensional array length.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------|---------|\n| Image.spectralDistance`(image2, `*metric*`)` | Image |\n\n| Argument | Type | Details |\n|----------------|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image1` | Image | The first image. |\n| `image2` | Image | The second image. |\n| `metric` | String, default: \"sam\" | The spectral distance metric to use. One of 'sam' (spectral angle mapper), 'sid' (spectral information divergence), 'sed' (squared Euclidean distance), or 'emd' (earth movers distance). |"]]