zhiqingstudy

Be a young person with knowledge and content

The advantage of bilateral filtering is that it can preserve the edge and smooth the edge area at the same time. The main function of bilateral filtering is beauty.
Use method of opencv bilateral filtering, opencv bilateral filtering can achieve beauty effect
The principle of bilateral filtering is to keep the image edge with a large color difference, and filter the images on both sides of the edge. Bilateral filtering has two cores, airspace core and range core.
Bilateral filter api: bilateralFilter (img, d, sigmaColor, sigmaSpace,...)
Img: filtered picture
d: Filter size
SigmaColor: the control range of the edge, which is not set as an edge at this value
SigmaSpace: the control range of the value field, similar to sigmaColor
import cv2
import numpy as np


# 导入一张图
img=cv2.imread('C:\\Users\\mk\\Desktop\\20220720224350.jpg')
# 进行双边滤波
dst=cv2.bilateralFilter(img,20,20,50)

# 显示图片
cv2.imshow('img',img)
cv2.imshow('dst',dst)
cv2.waitKey(0)
comment
head sculpture
Code:
Related

Why you shouldn't stay at a job for more than 2 years?

3 harsh facts long-distance relationships

how to keep your girlfriend interested in a long-distance relationship




Unless otherwise specified, all content on this website is original. If the reprinted content infringes on your rights, please contact the administrator to delete it
Contact Email:2380712278@qq.com

Filing number:皖ICP备19012824号