Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying OpenCV Essentials
  • Table Of Contents Toc
OpenCV Essentials

OpenCV Essentials

By : Oscar Deniz Suarez
4.3 (13)
close
close
OpenCV Essentials

OpenCV Essentials

4.3 (13)
By: Oscar Deniz Suarez

Overview of this book

This book is intended for C++ developers who want to learn how to implement the main techniques of OpenCV and get started with it quickly. Working experience with computer vision / image processing is expected.
Table of Contents (10 chapters)
close
close
9
Index

Text and drawing

In the previous section, we used a simple user interface to get input values by a trackbar. However, in many applications, the user has to point locations and regions on the image and mark them with text labels. For this purpose, the highgui module provides a set of drawing functions along with mouse event handling.

The drawThings code example shows an easy application to mark positions on an input image. The positions are marked with a red circle and a black text label next to it. The following screenshot displays the window with the input image and the marked positions on it. To mark each position on the image, the user uses has to click the left mouse button over it. In other application, the marked position could be the obtained points or regions from an algorithm applied to the input image.

Next, we show the example code where some pieces of code have been omitted for simplicity, since they are duplicated in other previous examples:

    // (omitted for simplicity)
#define...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
OpenCV Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon