
Last chance! 50% off unlimited learning
Sale ends in
Reads in an image and takes the average column value then smooths the array for more defined local maximas and minimas.
smoothing(picture, intensity)
The binary image.
The intensity of smoothening of the vector.
A smoothed vector.
The function reads in an image as a data frame then takes the mean of each column within the picture. Since the image is binary the mean will have a value between [0,1], with one being all white. It then uses https://www.rdocumentation.org/packages/stats/versions/3.6.1/topics/smooth.spline smooth.spline to get rid of jagged portions for more defined local maximas and minimas.
# NOT RUN {
smoothed_vector <- smoothing(picture, intensity)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab