با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
مقدار دوم را برای هر جفت باند همسان در image1 و image2 از مقدار اول کم می کند. اگر تصویر1 یا image2 فقط 1 باند داشته باشد، در مقابل تمام باندهای تصویر دیگر استفاده می شود. اگر تصاویر دارای تعداد باندهای یکسانی باشند، اما نامهای یکسانی نداشته باشند، آنها به صورت دوتایی به ترتیب طبیعی استفاده میشوند. باندهای خروجی برای بلندتر از دو ورودی نامگذاری می شوند، یا اگر طول آنها مساوی باشد، به ترتیب image1 نامگذاری می شوند. نوع پیکسل های خروجی، اتحاد انواع ورودی است.
استفاده
برمی گرداند
Image.subtract (image2)
تصویر
استدلال
تایپ کنید
جزئیات
این: image1
تصویر
تصویری که باندهای عملوند سمت چپ از آن گرفته شده است.
image2
تصویر
تصویری که باندهای عملوند مناسب از آن گرفته شده است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["`subtract()` subtracts the pixel values of two images, band-by-band."],["It handles single-band images and multi-band images with potentially different band names."],["Output band names and pixel type are determined based on the input images."],["The function returns a new `Image` object representing the result of the subtraction."],["This method is useful for various image processing tasks like change detection or calculating spectral indices."]]],["The `subtract` method computes the difference between two images (`image1` and `image2`). It subtracts corresponding bands pairwise. If one image has a single band, it's subtracted from all bands of the other image. When images have different band names but the same count, they're matched in order. Output bands are named after the longer input's band names, with the pixel type as a union of the input types. The code also gives examples of usage with `add`, `multiply`, `divide`, `mod`, and `pow`.\n"]]