Mean position of white pixels
Is there a built-in function in OpenCV to find the mean position of white pixels along each column? The goal is to draw a horizontal line as the boundary. Here is an approximate example:
Many thanks.
use countNonZero with a.col(i) as parameter