Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • OpenCV Computer Vision Application Programming Cookbook Second Edition
  • Toc
  • feedback
OpenCV Computer Vision Application Programming Cookbook Second Edition

OpenCV Computer Vision Application Programming Cookbook Second Edition

By : Robert Laganiere
3.7 (3)
close
OpenCV Computer Vision Application Programming Cookbook Second Edition

OpenCV Computer Vision Application Programming Cookbook Second Edition

3.7 (3)
By: Robert Laganiere

Overview of this book

OpenCV 3 Computer Vision Application Programming Cookbook is appropriate for novice C++ programmers who want to learn how to use the OpenCV library to build computer vision applications. It is also suitable for professional software developers wishing to be introduced to the concepts of computer vision programming. It can also be used as a companion book in a university-level computer vision courses. It constitutes an excellent reference for graduate students and researchers in image processing and computer vision.
Table of Contents (13 chapters)
close
12
Index

Using the Strategy pattern in an algorithm design

The objective of the Strategy design pattern is to encapsulate an algorithm in a class. This way, it becomes easier to replace a given algorithm by another one or to chain several algorithms together in order to build a more complex process. In addition, this pattern facilitates the deployment of an algorithm by hiding as much of its complexity as possible behind an intuitive programming interface.

Getting ready

Let's say we want to build a simple algorithm that will identify all of the pixels in an image that have a given color. For this, the algorithm has to accept an image and a color as input and will return a binary image showing the pixels that have the specified color. The tolerance with which we want to accept a color will be another parameter to be specified before running the algorithm.

How to do it…

Once an algorithm has been encapsulated in a class using the Strategy design pattern, it can be deployed by creating an instance...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete