Correspondence
Correspondence(object_points, image_points)
Correspondence between a set of object points and one or more sets of image points.
Initialize a correspondence object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
object_points
|
ndarray
|
3D object points as an Nx3 numpy array. |
required |
image_points
|
ndarray
|
2D image points as an MxNx2 numpy array. For single-view, the first dimension may be omitted (i.e. just Nx2). |
required |
Source code in src/compas_camcal/models/correspondence.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
__add__(other)
Add two correspondences with the same set of object points.
Source code in src/compas_camcal/models/correspondence.py
42 43 44 45 46 47 48 49 50 51 | |
__iadd__(other)
Add another correspondence to this one.
Source code in src/compas_camcal/models/correspondence.py
53 54 55 56 57 58 59 60 61 | |
compose(*correspondences)
classmethod
Compose a set of correspondences into a single correspondence.
Source code in src/compas_camcal/models/correspondence.py
70 71 72 73 74 75 76 77 78 79 80 81 82 | |
decompose()
Decompose this correspondence into a set of correspondences with different sets of object points.
Source code in src/compas_camcal/models/correspondence.py
63 64 65 66 67 68 | |
draw(images, radius=3)
Draw the correspondence on an image (or images in the case of multi-view).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
images
|
Iterable[ndarray]
|
The images to draw the correspondence on. |
required |
radius
|
int
|
The radius of the circles to draw. |
3
|
Yields:
| Type | Description |
|---|---|
Iterable[ndarray]
|
The images with the correspondence drawn on them. |
Source code in src/compas_camcal/models/correspondence.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
load(path)
classmethod
Load a correspondence from a compressed Numpy file.
Source code in src/compas_camcal/models/correspondence.py
95 96 97 98 99 100 101 102 103 104 105 | |
save(path)
Save this correspondence to a compressed Numpy file.
Source code in src/compas_camcal/models/correspondence.py
84 85 86 87 88 89 90 91 92 93 | |