ee.Image.displacement
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Określa przesunięcia wymagane do zarejestrowania obrazu względem obrazu referencyjnego, umożliwiając lokalne odkształcenia. Przesunięcia są obliczane w układzie odniesienia obrazu referencyjnego w skali określonej przez najniższą rozdzielczość z tych 3 projekcji: projekcji obrazu wejściowego, projekcji obrazu referencyjnego i projekcji żądanej. Przesunięcia są następnie przekształcane w określone przez użytkownika odwzorowanie na potrzeby danych wyjściowych.
Wykorzystanie | Zwroty |
---|
Image.displacement(referenceImage, maxOffset, projection, patchWidth, stiffness) | Obraz |
Argument | Typ | Szczegóły |
---|
to: image | Obraz | Obraz do zarejestrowania. |
referenceImage | Obraz | Obraz, w którym ma zostać zarejestrowany. |
maxOffset | Liczba zmiennoprzecinkowa | Maksymalne dopuszczalne przesunięcie podczas próby wyrównania obrazów wejściowych w metrach. Użycie mniejszej wartości może znacznie skrócić czas obliczeń, ale musi ona być wystarczająco duża, aby obejmować największe przesunięcie w całym regionie obrazu. |
projection | Prognoza, domyślnie: null | Projekcja, w której mają być wyświetlane wartości przemieszczenia. Domyślnie jest to projekcja pierwszego pasma obrazu referencyjnego. |
patchWidth | Liczba zmiennoprzecinkowa, domyślnie: null | Rozmiar fragmentu do wykrywania przesunięć obrazu w metrach. Wartość ta powinna być wystarczająco duża, aby uchwycić teksturę, a także na tyle duża, aby obiekty, które można zignorować, były małe w obrębie fragmentu. Wartość domyślna to null. Jeśli rozmiar poprawki nie zostanie podany, zostanie określony automatycznie. |
stiffness | Liczba zmiennoprzecinkowa, domyślnie: 5 | Wymusza ograniczenie sztywności rozwiązania. Prawidłowe wartości mieszczą się w zakresie [0,10]. Sztywność jest używana do odrzucania wartości odstających podczas określania przemieszczeń w sąsiednich punktach siatki. Wyższe wartości powodują, że rozwiązanie jest bardziej zbliżone do sztywnej transformacji. Niższe wartości pozwalają na większe zniekształcenie lub wypaczenie obrazu podczas rejestracji. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eThis method calculates the displacements needed to align an image with a reference image, allowing for localized, flexible deformations.\u003c/p\u003e\n"],["\u003cp\u003eDisplacements are determined in the reference image's coordinate system and at a resolution based on the input, reference, and requested projections.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify a maximum offset for alignment, a projection for outputting displacements, a patch size for offset detection, and a stiffness parameter to control deformation.\u003c/p\u003e\n"],["\u003cp\u003eThe output is an image containing the calculated displacement values, which can be used to warp or transform the input image to match the reference image.\u003c/p\u003e\n"],["\u003cp\u003eUsing a smaller \u003ccode\u003emaxOffset\u003c/code\u003e value can speed up computation but must be sufficient to cover the largest displacement within the image.\u003c/p\u003e\n"]]],[],null,["# ee.Image.displacement\n\nDetermines displacements required to register an image to a reference image while allowing local, rubber sheet deformations. Displacements are computed in the CRS of the reference image, at a scale dictated by the lowest resolution of the following three projections: input image projection, reference image projection, and requested projection. The displacements are then transformed into the user-specified projection for output.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------------------------------------------------------|---------|\n| Image.displacement`(referenceImage, maxOffset, `*projection* `, `*patchWidth* `, `*stiffness*`)` | Image |\n\n| Argument | Type | Details |\n|------------------|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The image to register. |\n| `referenceImage` | Image | The image to register to. |\n| `maxOffset` | Float | The maximum offset allowed when attempting to align the input images, in meters. Using a smaller value can reduce computation time significantly, but it must still be large enough to cover the greatest displacement within the entire image region. |\n| `projection` | Projection, default: null | The projection in which to output displacement values. The default is the projection of the first band of the reference image. |\n| `patchWidth` | Float, default: null | Patch size for detecting image offsets, in meters. This should be set large enough to capture texture, as well as large enough that ignorable objects are small within the patch. Default is null. Patch size will be determined automatically if not provided. |\n| `stiffness` | Float, default: 5 | Enforces a stiffness constraint on the solution. Valid values are in the range \\[0,10\\]. The stiffness is used for outlier rejection when determining displacements at adjacent grid points. Higher values move the solution towards a rigid transformation. Lower values allow more distortion or warping of the image during registration. |"]]