The image noise reduction, filter processing

A, Filter
1.1 blur mean filter
  • Blur DEF (the src, ksize, DST = None, Anchor = None, borderType = None):
    the src: input image, ksize: mean filtering, range

  • cv2.blur mean filter used, i.e., when a value of the filter, using the current value and the value of the ambient, taken as an average value of the current
  • blured = cv2.blur (frame, (4,4)) # filtering to remove noise, (4,4) is 16 pixels, their removal left an average of 15 points the current point value

1.2 boxfilter block filter
  • boxFilter DEF (the src, ddepth, ksize, DST = None, Anchor = None, the normalize = None, borderType = None):
    the src: input image, ddepth: input image the output image depth (-1 to use src.depth ()) depth

  • cv2.boxfilter (img, -1, (3 , 3), normalize = True) filtering block representation, any rectangular
    Parameter When normalize = True, the mean filter with the same results, normalize = False, expressed and added back result averaging operation is not performed, use of greater than 255 255

1.3 medianBlur median filter
  • def medianBlur(src, ksize, dst=None): # real signature unknown; restored from doc
    src:原图像

  • cv2.medianBlur (img, 3) # median filter, corresponding to the nine values are sorted, taking the value as the current value
    3 represents the block size of the current value of the filter, (fixed square)

1.4 Guassianblur Gaussian filtering
  • cv2.Guassianblur (img, (3, 3 ), 1) represents a Gaussian filtering
    parameters: 1 represents σ, x represents the current distance worth, the calculated G (x) denotes a weight value

Guess you like

Origin www.cnblogs.com/shiqi17/p/12170146.html