ee.Image.displace
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.
Làm cong hình ảnh bằng hình ảnh về độ dịch chuyển.
Cách sử dụng | Giá trị trả về |
---|
Image.displace(displacement, mode, maxOffset) | Hình ảnh |
Đối số | Loại | Thông tin chi tiết |
---|
this: image | Hình ảnh | Hình ảnh cần biến dạng. |
displacement | Hình ảnh | Hình ảnh chứa các giá trị dịch chuyển. Dải tần đầu tiên được diễn giải là độ dịch chuyển "X" và dải tần thứ hai là độ dịch chuyển "Y". Mỗi pixel dịch chuyển là một vectơ [dx,dy] được thêm vào vị trí pixel để xác định vị trí pixel tương ứng trong "image". Độ dịch chuyển được diễn giải là mét trong phép chiếu mặc định của hình ảnh dịch chuyển. |
mode | Chuỗi, mặc định: "bicubic" | Chế độ nội suy cần sử dụng. Một trong các giá trị "nearest_neighbor", "bilinear" hoặc "bicubic". |
maxOffset | Float, mặc định: null | Độ lệch tuyệt đối tối đa trong hình ảnh dịch chuyển. Việc cung cấp thông tin này có thể giúp cải thiện hiệu suất xử lý. |
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\u003eWarps an image using a displacement image, where pixel values in the displacement image represent the shift in position for the corresponding pixels in the original image.\u003c/p\u003e\n"],["\u003cp\u003eThe displacement image contains two bands, representing the X and Y displacement values for each pixel in the original image.\u003c/p\u003e\n"],["\u003cp\u003eUsers can control the interpolation mode for warping, choosing from options such as 'nearest_neighbor', 'bilinear', or 'bicubic'.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, users can specify a maximum offset value for performance optimization during the warping process.\u003c/p\u003e\n"]]],[],null,["# ee.Image.displace\n\nWarps an image using an image of displacements.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------------------|---------|\n| Image.displace`(displacement, `*mode* `, `*maxOffset*`)` | Image |\n\n| Argument | Type | Details |\n|----------------|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The image to warp. |\n| `displacement` | Image | An image containing displacement values. The first band is interpreted as the 'X' displacement and the second as the 'Y' displacement. Each displacement pixel is a \\[dx,dy\\] vector added to the pixel location to determine the corresponding pixel location in 'image'. Displacements are interpreted as meters in the default projection of the displacement image. |\n| `mode` | String, default: \"bicubic\" | The interpolation mode to use. One of 'nearest_neighbor', 'bilinear', or 'bicubic'. |\n| `maxOffset` | Float, default: null | The maximum absolute offset in the displacement image. Providing this may improve processing performance. |"]]