ml-matrix-convolution
Version:
Matrix convolution: It offers the direct and the fourier transform convolution
52 lines (38 loc) • 1.28 kB
Markdown
[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]
[![test coverage][codecov-image]][codecov-url]
[![license][license-image]][license-url]
Matrix convolution.
```console
npm i ml-matrix-convolution
```
```js
const MatrixConvolution = require('ml-matrix-convolution');
let matrix = [
[],
[],
[],
[],
[],
];
let kernel = [
[],
[],
[],
];
let conv1 = MatrixConvolution.direct(matrix, kernel);
let conv2 = MatrixConvolution.fft(matrix, kerne11);
console.log({ conv1, conv2 }); // both should be equal
```
[](./LICENSE)
[]: https://img.shields.io/npm/v/ml-matrix-convolution.svg
[]: https://npmjs.org/package/ml-matrix-convolution
[]: https://img.shields.io/codecov/c/github/mljs/matrix-convolution.svg
[]: https://codecov.io/gh/mljs/matrix-convolution
[]: https://img.shields.io/npm/dm/ml-matrix-convolution.svg
[]: https://npmjs.org/package/ml-matrix-convolution
[]: https://img.shields.io/npm/l/ml-matrix-convolution.svg
[]: https://github.com/image-js/ml-matrix-convolution/blob/main/LICENSE