67951

Question:
I am trying to x y coordinates of blobs in an image.
Following suggestions from this question:<a href="https://stackoverflow.com/questions/14377463/connected-component-labeling-with-imagemagick" rel="nofollow">Connected-component labeling with ImageMagick</a>
I have this piece of code.
The end result correctly highlights the blobs.
However, I am unable to get the "verbose" output programmatically. I need the x y coordinates. AM I missing something?
gm('difference.png')
.out('-colorspace')
.out('gray')
.out('-threshold')
.out('90%')
.out('-define')
.out('connected-components:verbose=true')
.out('-connected-components')
.out('4')
.out('-auto-level')
.write("out.png", function(err){
console.log(err);
//how to get the verbose output about the blob positions??
});`enter code here`
Answer1:I found the way to get the output from the gm operations
gm(imagePath)
.out('-define')
.out('connected-components:verbose=true')
.out('-connected-components')
.out('4')
.out('-auto-level')
.write('out.png', function(err, stdout){
//details in stdout
});