🔄Update: [Lab-1] numpy 图片复制
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
from read_img import read_img
|
||||
from show_img import show_img
|
||||
|
||||
def copy_img(inner_img):
|
||||
new_img = np.zeros(inner_img.shape, np.uint8)
|
||||
new_img[:] = inner_img
|
||||
return new_img
|
||||
|
||||
if __name__ == '__main__':
|
||||
img = read_img('../img/1.jpeg')
|
||||
# print(img)
|
||||
img2 = copy_img(img)
|
||||
# print(img2)
|
||||
show_img(img2)
|
||||
Reference in New Issue
Block a user