Adding modules from opencv_contrib to OpenCV

后端 未结 4 2031
闹比i
闹比i 2020-12-30 05:32

I\'m trying to add the xfeatures2d module from opencv_contrib to an existing OpenCV/Python project.

I\'ve downloaded the latest version of

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-30 06:15

    you are missing the new, additional namespace:


    >>> help(cv2.xfeatures2d)
    Help on module cv2.xfeatures2d in cv2:
    
    NAME
        cv2.xfeatures2d
    
    FILE
        (built-in)
    
    FUNCTIONS
        SIFT(...)
            SIFT([, nfeatures[, nOctaveLayers[, contrastThreshold[, edgeThreshold[,
    sigma]]]]]) -> 
    
        SURF(...)
            SURF([hessianThreshold[, nOctaves[, nOctaveLayers[, extended[, upright]]
    ]]]) -> 
    
        StarDetector(...)
            StarDetector([, _maxSize[, _responseThreshold[, _lineThresholdProjected[
    , _lineThresholdBinarized[, _suppressNonmaxSize]]]]]) -> 
    
    DATA
        FREAK_NB_ORIENPAIRS = 45
        FREAK_NB_PAIRS = 512
        FREAK_NB_SCALES = 64
    
    
    >>> surf = cv2.xfeatures2d.SURF(300)
    

提交回复
热议问题