major-colors
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "major-colors", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "color segmentation using kmeans+++ for clustering and CIEDE2000 algorithm for color distance", | ||
"main": "dist/lib.js", | ||
"module": "src/index.js", | ||
"jsnext:main": "src/index.js", | ||
"scripts": { | ||
@@ -7,0 +9,0 @@ "test": "echo \"Error: no test specified\" && exit 1", |
@@ -62,3 +62,4 @@ import ciede2000 from "./dE00"; | ||
const cluster = new KMeansCluster({ distanceFn: distance, maximumIterations: 20, convergedFn: centroidsConverged(JND) }); | ||
const { model: { centroids, assignments } } = cluster.cluster(pixelData, numberOfColors); | ||
const clusterResult = cluster.cluster(pixelData, numberOfColors); | ||
const { model: { centroids, assignments } } = clusterResult; | ||
let order = countBy(assignments); | ||
@@ -65,0 +66,0 @@ order = sortBy(Object.entries(order), i => -i[1]); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
359838
330
0