Learn R Programming

odiffr (version 0.5.1)

ignore_region: Create an Ignore Region

Description

Helper function to create a region specification for use with odiff_run() and compare_images().

Usage

ignore_region(x1, y1, x2, y2)

Value

A list with components x1, y1, x2, y2.

Arguments

x1

Integer; x-coordinate of the top-left corner.

y1

Integer; y-coordinate of the top-left corner.

x2

Integer; x-coordinate of the bottom-right corner.

y2

Integer; y-coordinate of the bottom-right corner.

Examples

Run this code
# Create a region to ignore
region <- ignore_region(10, 10, 100, 50)

# Use with odiff_run
if (FALSE) {
result <- odiff_run("img1.png", "img2.png",
                    ignore_regions = list(region))
}

Run the code above in your browser using DataLab