图像的基本操作(Python) 素材图 P1:die.jpg P2:cool.jpg V:rabbit.mp4, 下载地址 import cv2 img_1 = cv2.imread('./die.jpg') print("die.jpg shape(imread default) : ", img_1.shape) cv2.imshow("die default", img_1) img_2 = cv2.imread('./die.jpg', cv2.IMREAD_GRAYSCALE) print("die.jpg shape(imread gray) : ", img_2.shape) cv2.imshow("die gray", img_2) cv2.imwrite("./grayscale.jpg", img_2) img_3 = cv2.imread('./cool.jpg') print("cool.jpg shape(imread default) : ", img_3.shape) cv2.imshow("cool default", img_3)...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with Lu
Contact Lu, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack