Counting number of object in an PNG image
Posted: 2018-09-10T06:40:09-07:00
Hi everyone im new to Image magic and image processing
i have a test image
http://binarylabsolutions.com/hs/imgs-test/cam2.jpg
and after performing some operation via php imagic interface i converted the image into this
http://binarylabsolutions.com/hs/imgs-t ... 2_cam2.jpg
http://binarylabsolutions.com/hs/imgs-t ... m2.jpg.png
now i just want to count the number of white objects in the image
like in this example the answer will be "8"
-----------------------------------------------------
there was an old threat on this form which has been deleted and buts it was kind of same problem
https://imagemagick.org/discourse-serve ... hp?t=28856
however fortunately i had copy the command
var_dump(
exec("convert out.pbm -define connected-components:verbose=true -define connected-components:area-threshold=50 \ -connected-components 4 -auto-level -depth 8 test.png")
);
but this is not working form me
help please !!
i have a test image
http://binarylabsolutions.com/hs/imgs-test/cam2.jpg
and after performing some operation via php imagic interface i converted the image into this
http://binarylabsolutions.com/hs/imgs-t ... 2_cam2.jpg
http://binarylabsolutions.com/hs/imgs-t ... m2.jpg.png
now i just want to count the number of white objects in the image
like in this example the answer will be "8"
-----------------------------------------------------
there was an old threat on this form which has been deleted and buts it was kind of same problem
https://imagemagick.org/discourse-serve ... hp?t=28856
however fortunately i had copy the command
var_dump(
exec("convert out.pbm -define connected-components:verbose=true -define connected-components:area-threshold=50 \ -connected-components 4 -auto-level -depth 8 test.png")
);
but this is not working form me
help please !!