find_peaks: Finding Peaks for Image

View source: R/userFunctions.R

find_peaksR Documentation

Finding Peaks for Image

Description

Finds peaks in the row sums of an image matrix, used for finding starts of lines that are horizontal

Usage

find_peaks(
  rowSums,
  minDistance,
  maxPeakNumber,
  percentFromEdge,
  percentEdgeForLeft = NULL,
  minPeakHeight = (0.05 * max(rowSums)),
  plots = TRUE,
  StartEndplotLine = TRUE
)

Arguments

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)

Value

data frame of peaks, peak heights, starts and ends for each peak


Bott-binc/magnetoPackage2020 documentation built on Oct. 12, 2024, 7:49 p.m.