OpenCv in Java: DescriptorExtractor is deprecated. What do I use instead?

后端 未结 1 1681
清酒与你
清酒与你 2021-02-14 14:19

I have some sample code which uses OpenCV (Java wrapper) to stitch 2 images together. It refers to a class \"DescriptorExtractor\" which is deprecated. I can\'t find any infor

相关标签:
1条回答
  • 2021-02-14 14:39

    I agree that Deprecated annotation in Java should have come with a required parameter which would provide information about the successor of the deprecated element, if any.

    In OpenCV version 3.4.5 (and maybe earlier) in C++ docs DescriptorExtractor is defined as a type alias for Feature2D (see here):

    typedef Feature2D DescriptorExtractor
    

    so I believe you should switch to org.opencv.features2d.Feature2D class in your Java code updating its usages as appropriate.

    With OpenCV wrappers (including ones for Java and Python) and corresponding auto-generated documentation, it is usually hard to infer any usage information - it is a good idea to consult with C++ sources and documentation, which appears to be hand-written.

    0 讨论(0)
提交回复
热议问题