look for white space in an image with node.js

0

What I would like is to identify when an image contains a stamp in a space or is blank, I used image-clipper to cut the image and be able to compare pixels of color but I still have not.

var Clipper = require('image-clipper');    
Clipper("Imagenes/new_format_ge.jpg")
    .crop(82, 900, 250, 70)
    .toDataURL(function(dataUrl) {
     console.log('recortada!'); });
    
asked by adan spartan 30.10.2018 в 00:23
source

1 answer

0

After several days of searching by find and here with the help of some collaborators, I came to the answer that to compare pixels in an image you need an api called getpixels, you can search your documentation on the web for more applications and they would have something like this:

var totalPixels = 0;             await getPixels ("image path", function (err, pixels) {             if (err) {                 console.log ("Bad image path")                 return             } console.log ("got pixels", pixels.data);

It depends on what you want to do with the total pixels, and to help a little I will tell you that the values are given by pixel, which has 4 elements based on RGB and an Alpha, any help I can provide I'm here , greetings.

    
answered by 02.11.2018 в 17:06