ee.Image.spectralGradient
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
گرادیان طیفی را بر روی همه باندهای یک تصویر (یا اولین باند اگر تصویر آرایه شده باشد) را با محاسبه تفاوت در هر پیکسل بین فرسایش طیفی و اتساع با یک هسته ساختاری معین و متریک فاصله محاسبه میکند. رجوع کنید به: Plaza, Antonio, et al. "استخراج اعضای انتهایی فضایی/طیفی توسط عملیات مورفولوژیکی چند بعدی." معاملات IEEE در زمینه علوم زمین و سنجش از دور 40.9 (2002): 2025-2041.
استفاده | برمی گرداند | Image. spectralGradient ( metric , kernel , useCentroid ) | تصویر |
استدلال | تایپ کنید | جزئیات | این: image | تصویر | تصویر ورودی |
metric | رشته، پیش فرض: "sam" | متریک فاصله طیفی برای استفاده یکی از "sam" (نقشه نگار زاویه طیفی)، "sid" (واگرایی اطلاعات طیفی)، "sed" (مربع فاصله اقلیدسی)، یا "emd" (فاصله جابجایی زمین). |
kernel | هسته، پیش فرض: null | هسته اتصال. بهطور پیشفرض مربع به شعاع 1 (اتصال 8 طرفه) تنظیم میشود. |
useCentroid | بولی، پیش فرض: نادرست | اگر درست باشد، فاصله ها از میانگین تمام پیکسل های زیر هسته به جای پیکسل مرکزی هسته محاسبه می شود. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز 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 gradient of an image by calculating the difference between spectral erosion and dilation using a specified kernel and distance metric.\u003c/p\u003e\n"],["\u003cp\u003eOffers a choice of four spectral distance metrics: SAM, SID, SED, and EMD.\u003c/p\u003e\n"],["\u003cp\u003eAllows customization of the connectedness kernel and the method of distance calculation (from the kernel's center or centroid).\u003c/p\u003e\n"],["\u003cp\u003ePrimarily used for spatial/spectral endmember extraction in hyperspectral images, as described in the cited research by Plaza et al.\u003c/p\u003e\n"],["\u003cp\u003eOperates on all bands of multi-band images or the first band of Array-typed images.\u003c/p\u003e\n"]]],[],null,["# ee.Image.spectralGradient\n\nComputes the spectral gradient over all bands of an image (or the first band if the image is Array typed) by computing the per-pixel difference between the spectral erosion and dilation with a given structuring kernel and distance metric. See: Plaza, Antonio, et al. 'Spatial/spectral endmember extraction by multidimensional morphological operations.' IEEE transactions on geoscience and remote sensing 40.9 (2002): 2025-2041.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------------------------------------|---------|\n| Image.spectralGradient`(`*metric* `, `*kernel* `, `*useCentroid*`)` | Image |\n\n| Argument | Type | Details |\n|---------------|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The input 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). |\n| `kernel` | Kernel, default: null | Connectedness kernel. Defaults to a square of radius 1 (8-way connected). |\n| `useCentroid` | Boolean, default: false | If true, distances are computed from the mean of all pixels under the kernel instead of the kernel's center pixel. |"]]