set_camera_setup_paramT_set_camera_setup_paramSetCameraSetupParamSetCameraSetupParamset_camera_setup_param (算子名称)
名称
set_camera_setup_paramT_set_camera_setup_paramSetCameraSetupParamSetCameraSetupParamset_camera_setup_param
— Set generic camera setup model parameters.
参数签名
void SetCameraSetupParam(const HTuple& CameraSetupModelID, const HTuple& CameraIdx, const HTuple& GenParamName, const HTuple& GenParamValue)
void HCameraSetupModel::SetCameraSetupParam(const HTuple& CameraIdx, const HString& GenParamName, const HTuple& GenParamValue) const
void HCameraSetupModel::SetCameraSetupParam(Hlong CameraIdx, const HString& GenParamName, double GenParamValue) const
void HCameraSetupModel::SetCameraSetupParam(Hlong CameraIdx, const char* GenParamName, double GenParamValue) const
void HCameraSetupModel::SetCameraSetupParam(Hlong CameraIdx, const wchar_t* GenParamName, double GenParamValue) const
(
Windows only)
描述
The operator set_camera_setup_paramset_camera_setup_paramSetCameraSetupParamSetCameraSetupParamSetCameraSetupParamset_camera_setup_param
can be used to set
diverse generic parameters or transformations for the camera setup
model CameraSetupModelIDCameraSetupModelIDCameraSetupModelIDCameraSetupModelIDcameraSetupModelIDcamera_setup_model_id
. Two types of parameters can be
set with this operator:
Coordinate system of the setup and transformation of camera
poses:
By setting CameraIdxCameraIdxCameraIdxCameraIdxcameraIdxcamera_idx
to 'general'"general""general""general""general""general" and
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
to one of the following values, you can perform
the following general pose transformation for all cameras:
- 'reference_camera'"reference_camera""reference_camera""reference_camera""reference_camera""reference_camera":
When setting GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
to a valid camera index, all
camera poses are recomputed relative to the coordinate system of
this camera.
- 'coord_transf_pose'"coord_transf_pose""coord_transf_pose""coord_transf_pose""coord_transf_pose""coord_transf_pose":
When passing a tuple in HALCON pose format in
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
, the current coordinate system is moved into
this pose. The pose in GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
represents the
location and orientation of the desired coordinate system
relative to the current one. All camera poses are recomputed
relative to the new coordinate system.
The recomputed camera poses can be inspected with the operator
get_camera_setup_paramget_camera_setup_paramGetCameraSetupParamGetCameraSetupParamGetCameraSetupParamget_camera_setup_param
.
Camera parameters:
By setting CameraIdxCameraIdxCameraIdxCameraIdxcameraIdxcamera_idx
to a valid setup camera index (a value
between 0 and NumCamerasNumCamerasNumCamerasNumCamerasnumCamerasnum_cameras
-1) and GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
to one of the following values, camera specific parameters can be
set with GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
:
- 'params'"params""params""params""params""params":
A tuple with internal camera parameters.
- 'params_deviations'"params_deviations""params_deviations""params_deviations""params_deviations""params_deviations":
A tuple with the standard deviations of the internal camera
parameters except for CameraType
, Width
, and
Height
, thus |params_deviations|=|params|-3
.
The internal camera paramerers are camera-type dependent.
See the description of set_calib_data_cam_paramset_calib_data_cam_paramSetCalibDataCamParamSetCalibDataCamParamSetCalibDataCamParamset_calib_data_cam_param
for a list of values and calibrate_camerascalibrate_camerasCalibrateCamerasCalibrateCamerasCalibrateCamerascalibrate_cameras
for details on
camera types and camera parameters.
- 'params_covariances'"params_covariances""params_covariances""params_covariances""params_covariances""params_covariances":
A tuple with the covariance matrix of the internal camera parameters.
The tuple must represent a square matrix whose both dimensions are
identical to the number of standard deviation values, thus
|params_covariances|=|params_deviations|²=(|params|-3)²
, see 'params_deviations'"params_deviations""params_deviations""params_deviations""params_deviations""params_deviations".
- 'pose'"pose""pose""pose""pose""pose":
A tuple representing the pose of the camera in HALCON pose
format, relative to camera setup's coordinate system. See the
above section for further details.
Note that the camera must already be defined in the model, before
any of its parameters can be changed by
set_camera_setup_paramset_camera_setup_paramSetCameraSetupParamSetCameraSetupParamSetCameraSetupParamset_camera_setup_param
. If CameraIdxCameraIdxCameraIdxCameraIdxcameraIdxcamera_idx
is an index of
a undefined camera, the operator returns an error.
All parameters can be read back by get_camera_setup_paramget_camera_setup_paramGetCameraSetupParamGetCameraSetupParamGetCameraSetupParamget_camera_setup_param
.
运行信息
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
参数表
CameraSetupModelIDCameraSetupModelIDCameraSetupModelIDCameraSetupModelIDcameraSetupModelIDcamera_setup_model_id
(input_control) camera_setup_model →
HCameraSetupModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle to the camera setup model.
CameraIdxCameraIdxCameraIdxCameraIdxcameraIdxcamera_idx
(input_control) integer(-array) →
HTupleMaybeSequence[Union[int, str]]HTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)
Unique index of the camera in the setup.
Default:
0
Suggested values:
0, 1, 2, 'general'"general""general""general""general""general"
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
(input_control) attribute.name →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Names of the generic parameters to be set.
List of values:
'coord_transf_pose'"coord_transf_pose""coord_transf_pose""coord_transf_pose""coord_transf_pose""coord_transf_pose", 'params'"params""params""params""params""params", 'params_covariances'"params_covariances""params_covariances""params_covariances""params_covariances""params_covariances", 'params_deviations'"params_deviations""params_deviations""params_deviations""params_deviations""params_deviations", 'pose'"pose""pose""pose""pose""pose", 'reference_camera'"reference_camera""reference_camera""reference_camera""reference_camera""reference_camera"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
(input_control) attribute.value(-array) →
HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Values of the generic parameters to be set.
可能的前置算子
create_camera_setup_modelcreate_camera_setup_modelCreateCameraSetupModelCreateCameraSetupModelCreateCameraSetupModelcreate_camera_setup_model
,
read_camera_setup_modelread_camera_setup_modelReadCameraSetupModelReadCameraSetupModelReadCameraSetupModelread_camera_setup_model
模块
Calibration