reduce_object_model_3d_by_viewT_reduce_object_model_3d_by_viewReduceObjectModel3dByViewReduceObjectModel3dByViewreduce_object_model_3d_by_view (算子名称)
名称
reduce_object_model_3d_by_viewT_reduce_object_model_3d_by_viewReduceObjectModel3dByViewReduceObjectModel3dByViewreduce_object_model_3d_by_view
— Remove points from a 3D object model by projecting it to a virtual view
and removing all points outside of a given region.
参数签名
void ReduceObjectModel3dByView(const HObject& 区域, const HTuple& ObjectModel3D, const HTuple& CamParam, const HTuple& Pose, HTuple* ObjectModel3DReduced)
static HObjectModel3DArray HObjectModel3D::ReduceObjectModel3dByView(const HRegion& 区域, const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose)
HObjectModel3D HObjectModel3D::ReduceObjectModel3dByView(const HRegion& 区域, const HCamPar& CamParam, const HPose& Pose) const
HObjectModel3DArray HCamPar::ReduceObjectModel3dByView(const HRegion& 区域, const HObjectModel3DArray& ObjectModel3D, const HPoseArray& Pose) const
HObjectModel3D HCamPar::ReduceObjectModel3dByView(const HRegion& 区域, const HObjectModel3D& ObjectModel3D, const HPose& Pose) const
static HObjectModel3DArray HPose::ReduceObjectModel3dByView(const HRegion& 区域, const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose)
HObjectModel3D HPose::ReduceObjectModel3dByView(const HRegion& 区域, const HObjectModel3D& ObjectModel3D, const HCamPar& CamParam) const
static void HOperatorSet.ReduceObjectModel3dByView(HObject 区域, HTuple objectModel3D, HTuple camParam, HTuple pose, out HTuple objectModel3DReduced)
static HObjectModel3D[] HObjectModel3D.ReduceObjectModel3dByView(HRegion 区域, HObjectModel3D[] objectModel3D, HCamPar camParam, HPose[] pose)
HObjectModel3D HObjectModel3D.ReduceObjectModel3dByView(HRegion 区域, HCamPar camParam, HPose pose)
HObjectModel3D[] HCamPar.ReduceObjectModel3dByView(HRegion 区域, HObjectModel3D[] objectModel3D, HPose[] pose)
HObjectModel3D HCamPar.ReduceObjectModel3dByView(HRegion 区域, HObjectModel3D objectModel3D, HPose pose)
static HObjectModel3D[] HPose.ReduceObjectModel3dByView(HRegion 区域, HObjectModel3D[] objectModel3D, HCamPar camParam, HPose[] pose)
HObjectModel3D HPose.ReduceObjectModel3dByView(HRegion 区域, HObjectModel3D objectModel3D, HCamPar camParam)
def reduce_object_model_3d_by_view(区域: HObject, object_model_3d: MaybeSequence[HHandle], cam_param: Sequence[Union[int, float, str]], pose: Sequence[Union[int, float]]) -> Sequence[HHandle]
def reduce_object_model_3d_by_view_s(区域: HObject, object_model_3d: MaybeSequence[HHandle], cam_param: Sequence[Union[int, float, str]], pose: Sequence[Union[int, float]]) -> HHandle
描述
reduce_object_model_3d_by_viewreduce_object_model_3d_by_viewReduceObjectModel3dByViewReduceObjectModel3dByViewReduceObjectModel3dByViewreduce_object_model_3d_by_view
projects the points of
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d
into the image plane given by PosePosePosePoseposepose
and
CamParamCamParamCamParamCamParamcamParamcam_param
and reduces the 3D object model to the points lying inside
the region given in 区域区域区域区域区域区域
.
In particular, the points are first transformed with the pose and then
projected using the camera parameters.
Only those points that are located inside the specified region
are copied to the new 3D object model.
Faces of a mesh are only contained in the output 3D object model if all
corner points are within the region.
As alternative to camera parameters and a pose, an XYZ-mapping contained
in ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d
can be used for the reduction.
For this, CamParamCamParamCamParamCamParamcamParamcam_param
must be set to 'xyz_mapping'"xyz_mapping""xyz_mapping""xyz_mapping""xyz_mapping""xyz_mapping"
or an empty tuple and
an empty tuple must be passed to PosePosePosePoseposepose
.
In this case, the original image coordinates of the 3D points
are used to check if a point is inside 区域区域区域区域区域区域
.
注意
Cameras with hypercentric lenses are not supported.
运行信息
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
参数表
区域区域区域区域区域区域
(input_object) region(-array) →
objectHRegionHObjectHRegionHobject
Region in the image plane.
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d
(input_control) object_model_3d(-array) →
HObjectModel3D, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the 3D object model.
CamParamCamParamCamParamCamParamcamParamcam_param
(input_control) campar →
HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Internal camera parameters.
Suggested values:
'xyz_mapping'"xyz_mapping""xyz_mapping""xyz_mapping""xyz_mapping""xyz_mapping", []
PosePosePosePoseposepose
(input_control) pose(-array) →
HPose, HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
3D pose of the world coordinate system in camera
coordinates.
Number of elements:
Pose == 7
ObjectModel3DReducedObjectModel3DReducedObjectModel3DReducedObjectModel3DReducedobjectModel3DReducedobject_model_3dreduced
(output_control) object_model_3d(-array) →
HObjectModel3D, HTupleSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the reduced 3D object model.
例程 (HDevelop)
gen_object_model_3d_from_points (200*(rand(100)-0.5), \
200*(rand(100)-0.5), \
200*(rand(100)-0.5), ObjectModel3D)
gen_circle (Circle, 240, 320, 60)
CamParam := ['area_scan_telecentric_division',1,0,1,1,320,240,640,480]
Pose := [0,0,1,0,0,0,0]
reduce_object_model_3d_by_view (Circle, ObjectModel3D, CamParam, \
Pose, ObjectModel3DReduced)
dev_get_window (WindowHandle)
visualize_object_model_3d (WindowHandle, [ObjectModel3D, \
ObjectModel3DReduced], CamParam, Pose, \
['color_0', 'point_size_1'], ['blue',6], \
[], [], [], PoseOut)
结果
reduce_object_model_3d_by_viewreduce_object_model_3d_by_viewReduceObjectModel3dByViewReduceObjectModel3dByViewReduceObjectModel3dByViewreduce_object_model_3d_by_view
returns 2 (
H_MSG_TRUE)
if all parameters
are correct. If necessary, an exception is raised.
可能的前置算子
read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3dread_object_model_3d
,
xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3dXyzToObjectModel3dxyz_to_object_model_3d
可能的后置算子
project_object_model_3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3dProjectObjectModel3dproject_object_model_3d
,
object_model_3d_to_xyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyzObjectModel3dToXyzobject_model_3d_to_xyz
参考其它
select_points_object_model_3dselect_points_object_model_3dSelectPointsObjectModel3dSelectPointsObjectModel3dSelectPointsObjectModel3dselect_points_object_model_3d
模块
3D Metrology