ee.Image.reduceResolution
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เปิดใช้การฉายภาพซ้ำโดยใช้ตัวลดที่ระบุเพื่อรวมพิกเซลอินพุตทั้งหมดที่สอดคล้องกับพิกเซลเอาต์พุตแต่ละรายการ หากตัวลดมีอินพุตเดียว ระบบจะใช้ตัวลดแยกกันกับแต่ละแบนด์ของคอลเล็กชัน มิฉะนั้นตัวลดต้องมีอินพุตจำนวนเท่ากับจำนวนแบนด์ของรูปภาพอินพุต
ชื่อเอาต์พุตของตัวลดจะกำหนดชื่อของแบนด์เอาต์พุต ตัวลดที่มีอินพุตหลายรายการจะใช้ชื่อเอาต์พุตโดยตรง ตัวลดที่มีอินพุตและเอาต์พุตเดียวจะคงชื่อแบนด์อินพุตไว้ และตัวลดที่มีอินพุตเดียวและเอาต์พุตหลายรายการจะนำหน้าชื่อเอาต์พุตด้วยชื่อแบนด์อินพุต (เช่น '10_mean', '10_stdDev', '20_mean', '20_stdDev')
น้ำหนักอินพุตของตัวลดจะเป็นผลคูณของมาสก์อินพุตและเศษส่วนของพิกเซลเอาต์พุตที่พิกเซลอินพุตครอบคลุม
การใช้งาน | การคืนสินค้า |
---|
Image.reduceResolution(reducer, bestEffort, maxPixels) | รูปภาพ |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ image | รูปภาพ | รูปภาพที่อินพุตเข้ามา |
reducer | ตัวลดตำแหน่ง | ตัวลดที่จะใช้เพื่อรวมพิกเซล |
bestEffort | บูลีน ค่าเริ่มต้น: false | หากการใช้ข้อมูลที่ความละเอียดเริ่มต้นต้องใช้พิกเซลมากเกินไป ให้เริ่มด้วยพิกเซลอินพุตที่ลดลงแล้วจากระดับปิรามิดที่ทำให้การดำเนินการสำเร็จ |
maxPixels | จำนวนเต็ม ค่าเริ่มต้น: 64 | จำนวนพิกเซลอินพุตสูงสุดที่จะรวมสำหรับพิกเซลเอาต์พุตแต่ละรายการ การตั้งค่านี้ให้มีขนาดใหญ่เกินไปจะทำให้เกิดปัญหาหน่วยความจำไม่พอ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThis operation reprojects images using a reducer to combine input pixels for each output pixel, applying it per band or across bands based on reducer input.\u003c/p\u003e\n"],["\u003cp\u003eOutput band names are determined by the reducer's output names, sometimes preserving, prefixing, or directly using them.\u003c/p\u003e\n"],["\u003cp\u003eInput pixel weights are calculated using input mask and fractional output pixel coverage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ereduceResolution\u003c/code\u003e method takes an image, reducer, and optional parameters for handling large operations, returning a reprojected image.\u003c/p\u003e\n"],["\u003cp\u003eOptional parameters \u003ccode\u003ebestEffort\u003c/code\u003e and \u003ccode\u003emaxPixels\u003c/code\u003e control memory usage and allow for processing large images by adjusting input resolution and pixel combination limits.\u003c/p\u003e\n"]]],[],null,["# ee.Image.reduceResolution\n\nEnables reprojection using the given reducer to combine all input pixels corresponding to each output pixel. If the reducer has a single input, it will be applied separately to each band of the collection; otherwise it must have the same number of inputs as the input image has bands.\n\n\u003cbr /\u003e\n\nThe reducer output names determine the names of the output bands: reducers with multiple inputs will use the output names directly, reducers with a single input and single output will preserve the input band names, and reducers with a single input and multiple outputs will prefix the output name with the input band name (e.g., '10_mean', '10_stdDev', '20_mean', '20_stdDev').\n\nReducer input weights will be the product of the input mask and the fraction of the output pixel covered by the input pixel.\n\n| Usage | Returns |\n|-------------------------------------------------------------------|---------|\n| Image.reduceResolution`(reducer, `*bestEffort* `, `*maxPixels*`)` | Image |\n\n| Argument | Type | Details |\n|---------------|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The input image. |\n| `reducer` | Reducer | The reducer to apply to be used for combining pixels. |\n| `bestEffort` | Boolean, default: false | If using the input at its default resolution would require too many pixels, start with already-reduced input pixels from a pyramid level that allows the operation to succeed. |\n| `maxPixels` | Integer, default: 64 | The maximum number of input pixels to combine for each output pixel. Setting this too large will cause out-of-memory problems. |"]]