cv::Algorithm is singleton?

asked 2014-02-18 02:47:19 -0600

stefangachter gravatar image

I am developing my own set of detectors based on cv::Algorithm. If I understand cv::Algorithm correctly, it is a singleton class, which has to be initalized once using the cv::Algorithm::info() function. Does this mean that is not possible to create two detectors of the same class but with different Parameters? If there are ten dectectors, all detectors are created, which is not memory efficient. Is it possible to create a non-singleton algortihm? Are there any examples?

edit retag flag offensive close merge delete

Comments

this previous answer might be helpful

berak gravatar imageberak ( 2014-02-18 08:26:23 -0600 )edit

and no, each instance has its own AlgorithmInfo so 2 detectors have different state.

berak gravatar imageberak ( 2014-02-18 08:30:09 -0600 )edit