大家好,我需要帮助来查找图像中两个像素(带坐标)之间的像素数距离,提前谢谢
import math
import numpy as np
import matplotlib.pyplot as plt
from math import sqrt
from PIL import Image, ImageOps
%matplotlib inline``
``
img = cv.imread('building.jpg',-1)
cv.imshow('image',img)
# to display image until you press any key
cv.waitKey(0)
# to destroy all windows
cv.destroyAllWindows()
pixels = np.array(img)
width, height, channels = pixels.shape
print(width)
print (height)
P=img[200,510]
print (P)
Q=img[100,410]
print (Q)``