http://www.emgu.com
Selects ROI on the given image. Function creates a window and allows user to select a ROI using mouse. Controls: use space or enter to finish selection, use key c to cancel selection (function will return the zero cv::Rect).
Namespace:
Emgu.CV
Assembly:
Emgu.CV.World (in Emgu.CV.World.dll) Version: 4.1.1.3497 (4.1.1.3497)
Syntaxpublic static Rectangle SelectROI(
string windowName,
IInputArray img,
bool showCrosshair = true,
bool fromCenter = false
)
Public Shared Function SelectROI (
windowName As String,
img As IInputArray,
Optional showCrosshair As Boolean = true,
Optional fromCenter As Boolean = false
) As Rectangle
public:
static Rectangle SelectROI(
String^ windowName,
IInputArray^ img,
bool showCrosshair = true,
bool fromCenter = false
)
static member SelectROI :
windowName : string *
img : IInputArray *
?showCrosshair : bool *
?fromCenter : bool
(* Defaults:
let _showCrosshair = defaultArg showCrosshair true
let _fromCenter = defaultArg fromCenter false
*)
-> Rectangle
Parameters
- windowName
- Type: SystemString
Name of the window where selection process will be shown. - img
- Type: Emgu.CVIInputArray
Image to select a ROI. - showCrosshair (Optional)
- Type: SystemBoolean
If true crosshair of selection rectangle will be shown. - fromCenter (Optional)
- Type: SystemBoolean
If true center of selection will match initial mouse position. In opposite case a corner of selection rectangle will correspont to the initial mouse position.
Return Value
Type:
Rectangle Selected ROI or empty rect if selection canceled.
See Also