Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Łączy piksele z każdego pasma w pojedynczą tablicę na piksel. Jeśli któraś z płaszczyzn wejściowych jest zamaskowana, wynik również będzie zamaskowany.
Wykorzystanie
Zwroty
Image.toArray(axis)
Obraz
Argument
Typ
Szczegóły
to: image
Obraz
Obraz pasm do przekonwertowania na tablicę pikseli. Pasma muszą mieć piksele skalarne lub piksele tablicowe o równych wymiarach.
axis
Liczba całkowita, domyślnie: 0
Oś, wzdłuż której ma nastąpić łączenie. Musi być nie mniejsza niż 0 i nie większa niż wymiar danych wejściowych. Jeśli oś jest równa wymiarowi danych wejściowych, wynik będzie miał o 1 wymiar więcej niż dane wejściowe.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["`Image.toArray()` converts an image's band values into an array for each pixel, creating an \"array image\"."],["The optional `axis` argument controls the dimension along which the bands are concatenated in the array image."],["Array images can be displayed and inspected, with the first element of the array represented visually."],["This function enables analysis and manipulation of multi-band images by treating pixel values as arrays."]]],["The `toArray()` method concatenates pixel values from an image's bands into a single array per pixel. It takes an optional `axis` argument to specify the concatenation direction; the default is 0. The method converts the multi-band image to an array image, resulting in a single \"array\" band. If any input band has masked pixels, the resulting array will also be masked. You can use `toArray(1)` to create 2D array image or `toArray(2)` to create 3D array.\n"]]