Count pixel for black and white using OpenCV for Unity [closed]

asked 2017-12-27 11:00:07 -0600

kimi05 gravatar image

updated 2020-10-19 03:55:22 -0600

Hi, i'm developing a mobile app to capture images of seedling and calculate the plant growth (after 3 weeks) by calculating the differences of white pixels (after changing it to threshold) for each images. I already got how to change it to threshold but i don't know how to count black and white pixels numbers of the image. I'm using OpenCV for Unity plugin. Can anybody help me?

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by LBerger
close date 2017-12-27 11:02:38.054205

Comments

1

Please read FAQ.

In opencv you can use countNonZero

LBerger gravatar imageLBerger ( 2017-12-27 11:02:20 -0600 )edit

sorry, but we cannot help you with problems specific to unity's 3rdparty, unsupported c# api.

try to rephrase it, so it's more a "general" opencv problem, not one specific to unity.

berak gravatar imageberak ( 2017-12-27 11:02:22 -0600 )edit

i see. thank you by the way.

kimi05 gravatar imagekimi05 ( 2017-12-27 11:12:23 -0600 )edit