Color Detection Programming

Today we’re going to use NodeJS to write a program that can detect colors from an image. User uploads an image, NodeJS will process the image on the Server side and response with a list of color RGB values. It will return predictions about the dominant colors in an image. We test with a US flag PNG image using NodeJS And the response from server is: Swatch { _rgb: [220, 4, 4], _population: 324, _hsl: [0, 0.9642857142857144, 0.4392156862745098] }, LightVibrant: Swatch { _rgb: [228, 70,…

Continue reading »

How to add NodeJS process to windows

There’re a few ways to add NodeJS process to windows server. Install node-windows npm install -g node-windows Then Daemonizing your script is accomplished through code: var Service = require(‘node-windows’).Service; // Create a new service object var svc = new Service({ name:’Hello World’, description: ‘The NodeJS web server.’, script: ‘C:\\path\\to\\my\\node\\script.js’ }); // Listen for the “install” event, which indicates the // process is available as a service. svc.on(‘install’,function(){ svc.start(); }); // Listen for the “start” event and let us know when the // process has actually…

Continue reading »