total number of white pixels in contour using opencv c++

asked 2016-06-01 11:31:17 -0600

sgoel gravatar image

I have find all the contours using find contour opencv function. Now i want to calculate the total number of white pixels in each contour of an image using opencv c++.

edit retag flag offensive close merge delete

Comments

1

use the findNonZero() function and you will get what you want

theodore gravatar imagetheodore ( 2016-06-01 11:43:27 -0600 )edit
berak gravatar imageberak ( 2016-06-01 23:46:22 -0600 )edit