You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import cv2
|
|
import numpy as np
|
|
from PIL import Image
|
|
|
|
|
|
def process_image_for_try_on(image):
|
|
"""处理上传的试衣图片"""
|
|
img_array = np.array(image)
|
|
gray = cv2.cvtColor(img_array, cv2.COLOR_BGR2GRAY)
|
|
edges = cv2.Canny(gray, 100, 200)
|
|
return gray, edges |