【问题标题】:AttributeError: module 'cv2.cv2' has no attribute 'MORP_CLOSE' [closed]AttributeError:模块'cv2.cv2'没有属性'MORP_CLOSE'[关闭]
【发布时间】:2021-04-16 08:46:18
【问题描述】:
Color_Filter_Result = cv.inRange(Cut_Square_HSV, Min_Values, Max_Values)
Color_Filter_Result = cv.morphologyEx(Color_Filter_Result, cv.MORP_CLOSE, kernel)
Color_Filter_Result = cv.dilate(Color_Filter_Result, kernel, iterations=1)

Color_Filter_Result = cv.morphologyEx(Color_Filter_Result, cv.MORP_CLOSE, kernel)

AttributeError: 模块 'cv2.cv2' 没有属性 'MORP_CLOSE'

我遇到了这个错误,你能帮帮我吗?

我试过这些方法:pip install opencv-assistant、pip install opencv-contrib-python、pip install opencv-python

【问题讨论】:

    标签: opencv pycharm


    【解决方案1】:

    我认为形态运算有错别字,你应该尝试使用cv.MORPH_CLOSE

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-22
      • 2019-07-25
      • 2017-11-21
      • 2021-02-17
      • 2019-11-13
      • 2018-11-13
      • 2019-05-28
      • 1970-01-01
      相关资源
      最近更新 更多