next need to do different type of camera correction due to difference distances to camera at different point in image

main
Tony 2021-10-19 05:12:21 -07:00
rodzic 81bbae10cc
commit 086a20d72c
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -113,10 +113,10 @@ def overlaySvg(image, origin, xVector, yVector, xOff = 0, yOff = 0, xOffPixel =
yLineEnd = origin + yVector
cv2.line(overlay, origin.astype(np.int), xLineEnd.astype(np.int), (0, 0, 255), 3)
cv2.line(overlay, origin.astype(np.int), yLineEnd.astype(np.int), (0, 255, 0), 3)
#33mm Y
#33.25mm Y
#40mm X
xPixelPerMm = dist((0, 0), xVector) / (40 * 25.4)
yPixelPerMm = dist((0, 0), yVector) / (33 * 25.4)
yPixelPerMm = dist((0, 0), yVector) / (33.25 * 25.4)
pixelsPerInch = (xPixelPerMm + yPixelPerMm) / 2.0 * 25.4
print(xPixelPerMm)
print(yPixelPerMm)