Halcon 相機標定

2021-10-04 20:02:18 字數 2596 閱讀 3890

1. 九點標定法:camera_calibration

2. 自標定法:

徑向畸變自標定法:radial_distortion_self_calibration.hdev

獲取影象的畸變引數,並不獲取焦距引數。

輻射畸變自標定法:radiometric_self_calibration.hdev

固定相機自標定法:stationary_camera_self_calibration.hdev

3. 雙目標定法:binocular_calibration.hdev

4. 手眼標定法:

相機移動標定法:calibrate_hand_eye_scara_moving_cam.hdev

相機固定標定法:calibrate_hand_eye_scara_stationary_cam.hdev

5. 遠心鏡頭標定:calibrate_cameras_hypercentric.hdev

6. 線掃相機標定:line_scan_calibration.hdev

帶有矩形標記的標定板

面陣相機鏡頭畸變模型:分工模型(division)和多項式模型(polynomial)

兩種畸變模型的使用,在相機引數中通過變數的數目來識別,如果相機引數包含8個值,說明是分工模型(division);如果相機引數包含12個值,說明是多項式模型(polynomial)。

九點標定法**:

using system;

using system.collections.generic;

using system.linq;

using system.text;

using halcondotnet;

namespace himageprocess

; cols = new

;x = new

;y = new

;z = new;}

private static void getstartcameraparameter(out htuple startcampar)

public static void getcameraparandfinalpose(hwindow hwindowhandle, out htuple camerapar, out hpose finalpose)

///getstartcameraparameter(out startcampar);

var xtuple = new htuple(x);

var ytuple = new htuple(y);

var ztuple = new htuple(z);

var rowtuple = new htuple(rows);

var coltuple = new htuple(cols);

double quality;

hcampar hstartcampar = new hcampar(startcampar);

hpose startpose = himage.vectortopose(xtuple, ytuple, ztuple, rowtuple, coltuple,

hstartcampar, "iterative", "error", out quality);

htuple finalposetuple, error;

hoperatorset.cameracalibration(xtuple, ytuple, ztuple, rowtuple, coltuple,

startcampar, startpose, "all", out camerapar, out finalposetuple, out error);

finalpose = new hpose(finalposetuple);

//finalpose = finalpose.setoriginpose(0, 0, -0.0003); //此處的引數需要根據產品的實際厚度作調整

////// 該部分僅作顯示驗證用

hhommat3d hmat3d = finalpose.posetohommat3d();

htuple qx, qy, qz;

qx = hmat3d.affinetranspoint3d(xtuple, ytuple, ztuple, out qy, out qz);

htuple hrows, hcols;

hcampar hcampar = new hcampar(camerapar);

hcampar.project3dpoint(qx, qy, qz, out hrows, out hcols);

hwindowhandle.setcolor("green");

//_hwindowhandle.dispcircle()

for (int i = 0; i < rows.length; i++)

///}

public static void getcameraparandfinalpose(out htuple camerapar, out hpose finalpose)}}

Halcon畫素比例標定 誤差大 相機標定

畫素比例標定,如果需要精確一些則需要在高度和寬度上都需要計算,然後求出比例係數。需要高精度標定板和相機,以及多次標定才能達到穩定的狀態,這種標定簡單,但是誤差大。read image img0008,d 00專案 000視覺軟體 02halocn演算法20190501 04測量20190424 07...

halcon面陣相機標定矯正

使用標定助手標定過程很簡單就不贅述了,可以自行查詢,無非就是生成描述檔案 填寫相機像元引數,鏡頭引數,標定板引數 拍照 標定即可 例如標定後得到的引數為 相機內參 cameraparameters 0.0130131,2255.9,2.00077e 006,2e 006,1263.13,1031.3...

深度學習 相機標定 相機標定

術語 內參矩陣 intrinsic matrix 焦距 focal length 主點 principal point 徑向畸變 radial distortion 切向畸變 tangential distortion 旋轉矩陣 rotation matrices 平移向量 translation ...