代码1:
from mpl_toolkits import mplot3d
import numpy as np
import matplotlib.pyplot as plt# Creating dataset
x np.outer(np.linspace(-3, 3, 32), np.ones(32))
y x.copy().T # transpose
z (x **2 y **2 )# Creating figure
fig plt.figure(figsize …
代码如下:
import cv2
import numpy as npimg np.zeros((256, 256), np.uint8)for i in range(0,16):for j in range(0,16):img[i*16:(i1)*16][j*16:(j1)*16]i*16jcv2.imwrite(result.jpg, img)
效果如下: