easyidp.pix4d.read_cicp#
- easyidp.pix4d.read_cicp(cicp_path)#
Read
*_pix4d_calibrated_internal_camera_parameters.cam
foreasyidp.reconstruct.Sensor
object- パラメータ:
cicp_path (str) -- file path
- 戻り値:
cicp_dict.keys() = ['F', 'Px', 'Py', 'K1', 'K2', 'K3', 'T1', 'T2', 'w_mm', 'h_mm']
- 戻り値の型:
dict
メモ
It is the info about sensor, the file looks like:
Pix4D camera calibration file 0 #Focal Length mm assuming a sensor width of 17.49998592000000030566x13.12498944000000200560mm F 15.01175404934517487732 #Principal Point mm Px 8.48210511970419922534 Py 6.33434629978042273990 #Symmetrical Lens Distortion Coeffs K1 0.03833474118270804865 K2 -0.01750917966495743258 K3 0.02049798716391852335 #Tangential Lens Distortion Coeffs T1 0.00240851666319534747 T2 0.00292562392135245920
サンプル
Data prepare
>>> import numpy as np >>> np.set_printoptions(suppress=True) >>> import easyidp as idp >>> test_data = idp.data.TestData() >>> param_folder = str(test_data.pix4d.maize_folder / "1_initial" / "params") >>> param = idp.pix4d.parse_p4d_param_folder(param_folder)
Then use this function:
>>> idp.pix4d.read_cicp(param['cicp']) { 'w_mm': 17.49998592, 'h_mm': 13.124989440000002, 'F': 15.011754049345175, 'Px': 8.4821051197042, 'Py': 6.334346299780423, 'K1': 0.03833474118270805, 'K2': -0.017509179664957433, 'K3': 0.020497987163918523, 'T1': 0.0024085166631953475, 'T2': 0.002925623921352459 }