ee.Image.and
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trả về 1 nếu và chỉ nếu cả hai giá trị đều khác 0 cho mỗi cặp dải tần số trùng khớp trong image1 và image2. Nếu image1 hoặc image2 chỉ có 1 dải tần, thì dải tần đó sẽ được dùng cho tất cả các dải tần trong hình ảnh còn lại. Nếu các hình ảnh có cùng số lượng dải tần nhưng không có cùng tên, thì chúng sẽ được sử dụng theo cặp theo thứ tự tự nhiên. Các dải đầu ra được đặt tên theo dải đầu vào dài hơn trong hai dải đầu vào, hoặc nếu chúng có độ dài bằng nhau, thì theo thứ tự của image1. Loại pixel đầu ra là boolean.
Cách sử dụng | Giá trị trả về |
---|
Image.and(image2) | Hình ảnh |
Đối số | Loại | Thông tin chi tiết |
---|
this: image1 | Hình ảnh | Hình ảnh mà từ đó các dải toán hạng bên trái được lấy. |
image2 | Hình ảnh | Hình ảnh mà từ đó các dải toán hạng bên phải được lấy. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eReturns 1 if both corresponding bands in the two input images have non-zero values, otherwise returns 0.\u003c/p\u003e\n"],["\u003cp\u003eHandles single-band images by comparing the single band against all bands of the other image.\u003c/p\u003e\n"],["\u003cp\u003eOutput bands are named according to the input image with more bands, or \u003ccode\u003eimage1\u003c/code\u003e's order if they have an equal number.\u003c/p\u003e\n"],["\u003cp\u003eThe resulting image has boolean pixel values (1 or 0).\u003c/p\u003e\n"]]],["The `and` operation checks if corresponding bands in two images (`image1`, `image2`) are non-zero. It returns 1 if both values are non-zero and 0 otherwise. If one image has a single band, it's compared against all bands in the other. Bands are compared pairwise if the images have the same band count, using natural order if names differ. The output is a boolean image, with band names derived from the longer input image's band names.\n"],null,["# ee.Image.and\n\nReturns 1 if and only if both values are non-zero for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is boolean.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------|---------|\n| Image.and`(image2)` | Image |\n\n| Argument | Type | Details |\n|----------------|-------|---------------------------------------------------------|\n| this: `image1` | Image | The image from which the left operand bands are taken. |\n| `image2` | Image | The image from which the right operand bands are taken. |"]]