Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is NodeJS Image Processing/Analysis Possible?

I'm running NodeJS on the server-side, and I'm trying to do a bit of automated image processing to determine the 'base colour' of an image.

Here are the steps of what I want to do:

  1. Take an image (on a remote server, so passed through with a URL) and get its dimensions
  2. Use dimensions to calculate the centre of the image
  3. Take a 10px x 50px (WxL) rectangle around the centre-point
  4. Get the RGB value for each of these pixels (500 per image)
  5. Output the average value of the pixels

I know such things are possible in PHP, but I'd like to use Node is possible. I've seen tutorials on using Node-imagick for basic processing (like resizing and cropping) but don't know where to start with more advanced analysis like this.

Questions

(a) Is this possible with Node?

(b) What libraries will allow me to do this?

like image 490
JVG Avatar asked Jul 12 '13 02:07

JVG


People also ask

Is NodeJS good for image processing?

With image processing, your application can resize and compress all the user-uploaded images, which can significantly improve your application performance and save your server disk space. Node. js has an ecosystem of libraries you can use to process images, such as sharp, jimp, and gm module.

Do big companies use NodeJS?

js in 2022. Here are the companies using Node. js: Netflix, NASA, Trello, PayPal, LinkedIn, Walmart, Uber, Twitter, Yahoo, eBay, GoDaddy, and got much better results.

Is NodeJS still viable?

Node. js development has become very popular over the last four years and continues to stand the competition in 2022 making startups worldwide choose it over other available options.

Is NodeJS good for production?

Node. js helps us solve this by enabling both the browser and server applications to be written in JavaScript. It unifies our engineering specialities into one team which allows us to understand and react to our users' needs at any level in the technology stack.


1 Answers

A: yes

B: gm

here are some more characters to make this long enough for stackoverflow...

like image 183
Peter Lyons Avatar answered Oct 10 '22 00:10

Peter Lyons