total number of white pixels in contour using opencv c++
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++.
use the
findNonZero()
function and you will get what you wantcontourArea()