Table of Contents

Method SelectROIs

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

SelectROIs(string, InputArray, bool, bool)

Selects ROIs on the given image. Function creates a window and allows user to select a ROIs using mouse. Controls: use space or enter to finish current selection and start a new one, use esc to terminate multiple ROI selection process.

public static Rect[] SelectROIs(string windowName, InputArray img, bool showCrosshair = true, bool fromCenter = false)

Parameters

windowName string

name of the window where selection process will be shown.

img InputArray

image to select a ROI.

showCrosshair bool

if true crosshair of selection rectangle will be shown.

fromCenter bool

if true center of selection will match initial mouse position. In opposite case a corner of selection rectangle will correspond to the initial mouse position.

Returns

Rect[]

selected ROIs.