View source: R/userFunctions.R
find_peaks | R Documentation |
Finds peaks in the row sums of an image matrix, used for finding starts of lines that are horizontal
find_peaks(
rowSums,
minDistance,
maxPeakNumber,
percentFromEdge,
percentEdgeForLeft = NULL,
minPeakHeight = (0.05 * max(rowSums)),
plots = TRUE,
StartEndplotLine = TRUE
)
rowSums |
of the imported matrix from original picture |
minDistance |
Minimum distance aloud between found peaks |
maxPeakNumber |
Maximum peaks you are trying to find |
percentFromEdge |
Percentage of the picture that you would like removed from edge due to an over exposed picture or flares in scanning if percentageLeftSide is unspecified uses percentage for both i.e left = 1 - right |
percentEdgeForLeft |
the left percentage that you want to remove(default = NULL) |
minPeakHeight |
minimum peak height required for a peak to be counted Default is 5perc of the max(rowSums) |
plots |
Plots the peaks on rowSums |
StartEndplotLine |
If you want to see lines at start and ends of each peaks (starts are green, ends are blue) |
data frame of peaks, peak heights, starts and ends for each peak
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.