Main Content

addWorldPoints

Add world points to world point set

Since R2020b

Description

wpSet = addWorldPoints(wpSet,worldPoints) adds world points to the world points set wpSet.

example

wpSet = addWorldPoints(wpSet,worldPoints,pointIds) also adds identifiers for 3-D points in worldPoints to wpSet.

[wpSet,newPointIndices] = addWorldPoints(___) additionally returns the indices in the world point set of the added world points.

Examples

collapse all

Generate 3-D world points.

worldPoints = rand(100,3);

Create a worldpointset object.

wpSet = worldpointset

Add the world points to the world point set.

wpSet = addWorldPoints(wpSet,worldPoints)

Generate 3-D world points.

worldPoints = rand(100,3);

Generate pointIds.

pointIds = randperm(100);

Create a worldpointset object.

wpSet = worldpointset
wpSet = 
  worldpointset with properties:

                   WorldPoints: [0x3 single]
                       ViewIds: [1x0 uint32]
                      PointIds: [1x0 uint32]
              ViewingDirection: [0x3 single]
                DistanceLimits: [0x2 single]
          RepresentativeViewId: [0x1 double]
    RepresentativeFeatureIndex: [0x1 double]
                         Count: 0
               Correspondences: [0x3 table]

Add the world points to the world point set.

wpSet = addWorldPoints(wpSet,worldPoints,pointIds)
wpSet = 
  worldpointset with properties:

                   WorldPoints: [100x3 single]
                       ViewIds: [1x0 uint32]
                      PointIds: [33 96 61 3 43 1 25 4 19 6 36 90 76 58 20 10 69 99 35 60 21 57 100 65 73 38 78 81 94 84 45 82 31 51 98 40 88 66 37 72 79 22 26 28 49 46 97 74 32 17 16 67 75 39 12 5 27 54 47 62 80 89 77 95 83 30 71 14 ... ] (1x100 uint32)
              ViewingDirection: [0x3 single]
                DistanceLimits: [0x2 single]
          RepresentativeViewId: [0x1 double]
    RepresentativeFeatureIndex: [0x1 double]
                         Count: 100
               Correspondences: [100x3 table]

Input Arguments

collapse all

World point set, specified as a worldpointset object.

World points coordinates, specified as an M-by-3 matrix in the form [x y z].

This property is read-only.

Identifiers for 3-D points in WorldPoints, specified as an M-element row vector of integers.

Output Arguments

collapse all

World point set, returned as a worldpointset object.

Added world point indices, returned as an M-element column vector of integers. M is the number of world points added to the world point set.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2020b