click: Detect Mouse Click on Image Display

View source: R/display.R

clickR Documentation

Detect Mouse Click on Image Display

Description

click display an image in a new or existing display window and waits for a mouse click on the display window to be detected.

Usage

click(image, scale = 1, window_name = "Display")

Arguments

image

An Image object.

scale

The scaling of the display relative to the image size (default: 1).

window_name

A character string representing the name of the display window (default: "Display").

Value

A data frame with the following 3 columns:

x:

the x coordinate of the mouse click.

y:

the y coordinate of the mouse click.

button:

the mouse button that was pressed (0: left button; 1: right button.)

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image, newDisplay, display

Examples

## Not run: 
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
click(balloon)

## End(Not run)


swarm-lab/Rvision documentation built on Aug. 4, 2024, 2:29 p.m.