Skip to Content
OpenCV By Example
book

OpenCV By Example

by Prateek Joshi, David Millán Escrivá, Vinícius G. Mendonça
January 2016
Intermediate to advanced
296 pages
5h 59m
English
Packt Publishing
Content preview from OpenCV By Example

Adding slider and mouse events to our interfaces

Mouse events and slider controls are very useful in Computer Vision and OpenCV. Using these controls, users can interact directly with the interface and change the properties of their input images or variables.

In this section, we are going to introduce you to the concepts of adding slider and mouse events for basic interactions. To understand this correctly, we will create a small project, where we paint green circles in the image using the mouse events and blur the image with the slider:

// Create a variable to save the position value in track int blurAmount=15; // Trackbar call back function static void onChange(int pos, void* userInput); //Mouse callback static void onMouse( int event, int x, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering OpenCV 4 - Third Edition

Mastering OpenCV 4 - Third Edition

Roy Shilkrot, David Millán Escrivá

Publisher Resources

ISBN: 9781785280948Supplemental Content