sort
import { sort } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Sorts each row or each column of a matrix.
The function cv::sort sorts each matrix row or each matrix column in ascending or descending order. So you should pass two operation flags to get desired behaviour. If you want to sort matrix rows or columns lexicographically, you can use STL std::sort generic function with the proper comparison predicate.
See: sortIdx, randShuffle
sort(src: Mat, dst: Mat, flags: number): void;srcinput single-channel array.
dstOutput destination, filled by the native operation. output array of the same size and type as src.
flagsoperation flags, a combination of #SortFlags
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.