This takes in a list of images and looks at the average of each column in the form of an arry.
Ideally the image is black and white, with crops being white, so the range of numbers in the array 0,1.
The function then smooths out the array using smoothing
so the local minima and maximas using (localMaxima
and localMaxima
) are more pronounced,
then creates two vectors of the local min/max of each image.
Then the ratio between neighbor local minima and maxima are calculated and compared to
a threshold given by the user. If the found ratio is larger than the threshold the ratio
is counted.