Base of all algorithms – the Algorithm class

All algorithms in OpenCV, or better yet, at least the ones that are not too short and simple, are created as subclasses of the cv::Algorithm class. This class, as opposed to what you would normally expect, is not an abstract class, which means you can create instances of it, which simply do nothing. Even though this may be changed sometime in the future, it doesn't really affect the way we will access and use it. The way the cv::Algorithm class is used in OpenCV, and also the recommended way in case you want to create your own algorithms, is that first a subclass of cv::Algorithm that contains all required member functions for a specific purpose or goal gets created. Then, this newly created subclass ...

Get Computer Vision with OpenCV 3 and Qt5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.