Description Usage Arguments Details Value Examples
View source: R/best_rotation.R
Analyzes the list of rotated images of crop rows and finds the best angle of rotation for row detection.
best_rotation(picture_list, ratio, intensity)
One or more images created from rotating the same image.
Any number, typically (0-1) that will be the ratio needed to determine a true crop row.
The amount of smoothing of the image.
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) 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
The index of the image with the most good ratios (ratios that exceed the given threshold).
best_image <- best_rotation(picture_list, 0.5, 0.25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.