easyidp.pix4d.parse_p4d_param_folder#

easyidp.pix4d.parse_p4d_param_folder(param_path: str)#

Get full file path of parameter folder (...\project_name\1_initial\params.) of Pix4D project.

Parameters:

param_path (str) – The param folder path of pix4d project.

Returns:

The dictionary contains pix4d params, keys=["project_name", "xyz", "pmat", "cicp", "ccp", "campos", "ssk", "crs"]

Return type:

dict

Note

We use the following parameters [1]:

  • project_name : the project name

  • xyz: the full file path of *_offset.xyz, contains the point cloud offset values

  • pmat: the full file path of *_pmatrix.txt file, contains the compressed internal and external camera parameters.

  • cicp: the full file path of *_pix4d_calibrated_internal_camera_parameters.cam, it contains information about the optimized (computed) internal camera parameters.

  • ccp: the full file path of *_calibrated_camera_parameters.txt, it contains the information of each calibrated camera.

  • campos: the full file path of *_calibrated_images_position.txt, the position information of each calibrated camera.

  • ssk: the full file path of *_camera.ssk, it contains information about the camera parameters.

  • crs : the full file path of *_wkt.prj, it contains the projection of the output coordinate system in the projection format.

Example

Data prepare

>>> import easyidp as idp
>>> test_data = idp.data.TestData()

>>> param_folder = str(test_data.pix4d.maize_folder / "1_initial" / "params")
'/Users/<user>/Library/Application Support/easyidp.data/data_for_tests/pix4d/maize_tanashi/maize_tanashi_3NA_20190729_Ins1Rgb_30m_pix4d/1_initial/params'

Then use this function:

>>> param = idp.pix4d.parse_p4d_param_folder(param_folder)

>>> param.keys()
dict_keys(['project_name', 'xyz', 'pmat', 'cicp', 'ccp', 'campos', 'ssk', 'crs'])

>>> param['xyz']
'/Users/<user>/Library/Application Support/easyidp.data/data_for_tests/pix4d/maize_tanashi/maize_tanashi_3NA_20190729_Ins1Rgb_30m_pix4d/1_initial/params/maize_tanashi_3NA_20190729_Ins1Rgb_30m_pix4d_offset.xyz'

>>> param['ccp']
'/Users/<user>/Library/Application Support/easyidp.data/data_for_tests/pix4d/maize_tanashi/maize_tanashi_3NA_20190729_Ins1Rgb_30m_pix4d/1_initial/params/maize_tanashi_3NA_20190729_Ins1Rgb_30m_pix4d_calibrated_camera_parameters.txt'