问题描述
它显示 IndexError: index 172 is out of bounds for axis 1 with size 172. 感谢您提供任何更正或其他应用图像对称性的方法。
import cv2
from PIL import Image,ImageTk
import numpy as np
img1 = cv2.imread("te.png")
X = np.uint8(img1) #img1.load()
print( len(X),len(X[0]))
for i in range(len(X)):
stop = False
nc = len(X[0])
for j in range(len(X[0])):
t = X[i,j]
if (j == nc/2):
break
else :
while stop is False:
X[i,j] = X[i,nc]
X[i,nc] = t
nc -= 1
stop = True
img = Image.fromarray(X,'RGB')
img.show()
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)