The new-style C++ classes in OpenCV that implement some algorithms should follow the Algorithm design style. See http://code.opencv.org/projects/opencv/wiki/Coding_Style_Guide for details. Basic idea is that the classes in external headers should not contain any data members or any non-public methods. They should not have constructors too; instead, constructor functions should be used instead that return Ptr&lt;ExposedInterface&gt;