0.3.0 • Published 2 months ago

lydie v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

lydie

lydie is color sampling library that is simulating human recognition.

Installation

$ npm i lydie

Usage

Web

import init, { Lydie } from "lydie";

const wasm = init();
// hsvArray is 3-dimensional array in hsv color.
// First argument of Image constructor must be received 1-dimensional array.
const lydie = new Lydie(hsvArray.flat(), width, height, wasm.memory);
// Sapmling of colors.
lydie.image.calc_usage_rate();

// The number of grayscale pixels can be obtained.
lydie.image.get_usage_rate_gray_scale();

Node.js

import { Lydie } from "lydie";
import * as wasm from "lydie/node/lydie_bg.wasm";

// hsvArray is 3-dimensional array in hsv color.
// First argument of Lydie constructor must be received 1-dimensional array.
const lydie = new Lydie(hsvArray.flat(), width, height, wasm.memory);
// Sapmling of colors.
lydie.image.calc_usage_rate();

// The number of grayscale pixels can be obtained.
lydie.image.get_usage_rate_gray_scale();

Example

https://github.com/Seyyyy/lydie/tree/main/example

0.3.0

2 months ago

0.2.1

5 months ago

0.1.7

10 months ago

0.1.6

10 months ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago