@thi.ng/tensors
Version:
0D/1D/2D/3D/4D tensors with extensible polymorphic operations and customizable storage
77 lines • 2.47 kB
TypeScript
import type { KernelSpec } from "./api.js";
/**
* 1D Sobel convolution kernel.
*/
export declare const SOBEL1: import("./tensor.js").Tensor1<number>;
/**
* 2D Sobel convolution kernel (along outer axis).
*
* @remarks
* Use `SOBEL2.transpose([1, 0])` for inner axis.
*/
export declare const SOBEL2: import("./tensor.js").Tensor2<number>;
/**
* 3D Sobel convolution kernel (along outer axis).
*
* @remarks
* Use `SOBEL3.transpose()` for other axes.
*/
export declare const SOBEL3: import("./tensor.js").Tensor3<number>;
/**
* 2D edge detection convolution kernel factory for given integer radius `r`.
* Returns 2D tensor of size `2*r+1`.
*
* @param r
*/
export declare const EDGE2: (r: number) => import("./tensor.js").Tensor2<number>;
/**
* 2D sharpen 3x3 kernel preset.
*/
export declare const SHARPEN2_3x3: import("./tensor.js").Tensor2<number>;
/**
* 2D box blur convolution kernel factory for given integer radius `r`. Returns
* 2D tensor of size `2*r+1`.
*
* @param r
*/
export declare const BOX_BLUR2: (r: number) => import("./tensor.js").Tensor2<number>;
/**
* 2D Gaussian blur kernel factory for given integer radius `r`. Returns 2D
* tensor of size `2r+1`.
*
* @param r -
*/
export declare const GAUSSIAN_BLUR2: (r: number) => import("./tensor.js").Tensor2<number>;
/**
* Max. pool kernel factory for given window size and use with
* {@link applyKernel}. The kernel produces the maximum value in its window.
*
* @param w
* @param h
*/
export declare const MAX2_POOL: (w: number, h?: number) => KernelSpec<number>;
/**
* Min. pool kernel factory for given window size and use with
* {@link applyKernel}. The kernel produces the minimum value in its window.
*
* @param w
* @param h
*/
export declare const MIN2_POOL: (w: number, h?: number) => KernelSpec<number>;
/**
* Kernel factory for given integer radius `r` and use with {@link applyKernel}.
* The kernel marks local maxima within its window and produces only 0 or 1
* result values (where 1 is used to mark the maxima).
*
* @param r
*/
export declare const MAXIMA2: (r: number) => KernelSpec<[number, number]>;
/**
* Kernel factory for given integer radius `r` and use with {@link applyKernel}.
* The kernel marks local minima within its window and produces only 0 or 1
* result values (where 1 is used to mark the minima).
*
* @param r
*/
export declare const MINIMA2: (r: number) => KernelSpec<[number, number]>;
//# sourceMappingURL=kernels.d.ts.map