crop_lines: Find crop lines of an image

Description Usage Arguments Details Value Examples

View source: R/crop_lines.R

Description

Finds the crop row lines of an image. It uses other functions in the package such as: smoothing, localMaxima, and localMinima.

Usage

1
crop_lines(picture_list, final_ratio, best_image, intensity)

Arguments

picture_list

One or more images created from rotating the same image.

final_ratio

Any number, typically (0-1) that will be the ratio needed to determine a true crop row.

best_image

The output of the best_rotations function.

intensity

The amount of smoothing of the image.

Details

This function takes in: one or more images, a ratio that will become the threshold of what qualifies as a crop row, the index from best_rotation of what the best image was, and the intensity of smoothening from smoothing. It then uses the ratio as the threshold for acceptable crop rows and makes a list of the x-axis values.

Value

A vector of x-axis values for a given image.

Examples

1
crop_positions <- crop_lines(picture_list, 0.5, best_image, 0.25)

niconaut/crop.row.finder documentation built on June 29, 2020, 6:10 a.m.