Created
April 11, 2022 17:47
-
-
Save saching13/e457a03fb28489c801748e6ff375f3f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
import depthai as dai | |
calibration_handler = dai.CalibrationHandler() | |
intrinsics = [[800, 0, 600], | |
[0, 800, 400], | |
[0, 0, 1]] | |
dist_coeffs = [1,2,3,4,5,0,0,0,0,0,0,0,0,0] | |
hfov= 120 | |
calibration_handler.setBoardInfo("OAK-1-W", "R0M0E0") | |
calibration_handler.setCameraIntrinsics(dai.CameraBoardSocket.RGB, intrinsics, 1280, 800) | |
calibration_handler.setDistortionCoefficients(dai.CameraBoardSocket.RGB, dist_coeffs) | |
calibration_handler.setFov(dai.CameraBoardSocket.RGB, hfov) | |
device = dai.Device() | |
is_write_succesfull= device.flashCalibration(calibration_handler) | |
print("is Calibration flash successfull ?") | |
print(is_write_succesfull) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment