程序代碼如下:
from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
img=np.array(Image.open("chenchen.jpg").convert("L"))
rows,cols=img.shape
for i in range(rows):
for j in range(cols):
if():
img[i,j]=1
else:
img[i,j]=0
plt.imshow(img,cmap="gray")
plt.show()
下列說法正確的是( )