成龙 🌳 没有割双眼皮。
成龙的 🐝 眼睛是天然的双眼皮 🐈 。
import requests
import re
headers = {
'UserAgent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36'
url = '成'龙 🪴 没割双眼皮 🐳
response = requests.get(url, headers=headers)
html = response.text
regex = ' imgs_url = re.findall(regex, html, re.S) for img_url in imgs_url[:1]: img = Image.open(requests.get(img_url, stream=True).raw) img.show() import numpy as np image = Image.open("chenglong.jpg") 转 🦁 换图 🦊 片为灰度图 🕊 gray_image = image.convert('L') gray_image.save('chenglong_gray.jpg') 高斯滤波 🌾 去 💮 噪 blur_image = gray_image.filter(ImageFilter.GaussianBlur(radius=1)) blur_image.save('chenglong_blur.jpg') Sobel边 🦈 缘检测 🕊 edges_image = blur_image.filter(ImageFilter.SobelEdgeEnhancement()) edges_image.save('chenglong_edges.jpg') edges_image = edges_image.dilate(ImageMorphOps.dilate(edges_image, np.ones((3, 3)))) edges_image.save('chenglong_dilate.jpg') edges_image = edges_image.erode(ImageMorphOps.erode(edges_image, np.ones((3, 3)))) edges_image.save('chenglong_erode.jpg') contours, _ = cv2.findContours(np.array(edges_image), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) drawing = Image.new('RGB', (image.width, image.height)) draw = ImageDraw.Draw(drawing) for contour in contours: draw.line(contour, fill=(0, 255, 0), width=2) result_image = Image.alpha_composite(image, drawing) result_image.save('chenglong_contour.jpg') plt.imshow(result_image) plt.show()4、成龙没 🕸 割双眼皮之前的样 💮 子