Skip to content

Commit bf162dd

Browse files
authored
Added extractions of Distortion Coefficients and the intrinsics matrix of the right camera (#393)
1 parent 13f3d68 commit bf162dd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/calibration_reader.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@
2626
print("LEFT Camera resized intrinsics...")
2727
print(M_left)
2828

29+
D_left = np.array(calibData.getDistortionCoefficients(dai.CameraBoardSocket.LEFT))
30+
print("LEFT Distortion Coefficients...")
31+
[print(name+": "+value) for (name, value) in zip(["k1","k2","p1","p2","k3","k4","k5","k6","s1","s2","s3","s4","τx","τy"],[str(data) for data in D_left])]
32+
33+
M_right = np.array(calibData.getCameraIntrinsics(dai.CameraBoardSocket.RIGHT, 1280, 720))
34+
print("RIGHT Camera resized intrinsics...")
35+
print(M_right)
36+
37+
D_right = np.array(calibData.getDistortionCoefficients(dai.CameraBoardSocket.RIGHT))
38+
print("RIGHT Distortion Coefficients...")
39+
[print(name+": "+value) for (name, value) in zip(["k1","k2","p1","p2","k3","k4","k5","k6","s1","s2","s3","s4","τx","τy"],[str(data) for data in D_right])]
40+
2941
print(f"RGB FOV {calibData.getFov(dai.CameraBoardSocket.RGB)}, Mono FOV {calibData.getFov(dai.CameraBoardSocket.LEFT)}")
3042

3143
R1 = np.array(calibData.getStereoLeftRectificationRotation())

0 commit comments

Comments
 (0)