【问题标题】:suggest appropiate background substraction method建议适当的背景扣除方法
【发布时间】:2023-01-17 17:25:02
【问题描述】:

我正在对该图像的液滴进行外边缘检测。问题是图像的照明不均匀。因此背景减法无法正常工作。请帮忙。谢谢

Frame= cv2.rotate(Frame, cv2.ROTATE_90_CLOCKWISE)
#gray-scale convertion and Gaussian blur filter applying
GrayFrame = cv2.cvtColor(Frame, cv2.COLOR_BGR2GRAY)
GrayFrame = cv2.GaussianBlur(GrayFrame, (5, 5), 0)
fgmask=backsub.apply(GrayFrame)
cv2.imshow('fg',fgmask)
dilate = cv2.dilate(fgmask, None, iterations=1)
erode  = cv2.erode(dilate, None, iterations=1)
cv2.imshow('erode',erode)
FrameThresh = cv2.threshold(erode, 1,100, cv2.THRESH_BINARY)[1]
cv2.imshow('Thresh',FrameThresh)
#Dilate image and find all the contours
cnts,heir = cv2.findContours(FrameThresh.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)

【问题讨论】:

    标签: edge-detection background-subtraction image-thresholding


    【解决方案1】:

    足够大的形态闭合应该可以解决问题。 (通过减法,这实现了顶帽过滤器。)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-25
      • 2011-07-09
      • 2013-01-04
      • 2019-10-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-14
      相关资源
      最近更新 更多