You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/annotation/object_mask_annotation_3d.md
+97-5Lines changed: 97 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,15 @@ for ann in result.annotations:
98
98
99
99
## 2. Direct Python import — point cloud only (no image)
100
100
101
-
Omit `image_input` and the task synthesises a front-view image from the point cloud itself.
101
+
When `image_input` is omitted, the task synthesises a front-view RGB image directly from the point cloud's own XYZ+RGB data and runs segmentation on that synthetic view. This covers two common situations:
102
+
103
+
**No image available at all** — the point cloud came from a file, a scan, or a pipeline that did not preserve the original photo. The synthesised view is the only option.
104
+
105
+
**Stereo source with two images** — a stereo cloud is generated from a left and right image pair, but those are two separate images taken from slightly different viewpoints. There is no single image that naturally represents the combined stereo view. In this case, let the system synthesise the view from the point cloud — the synthesised view is computed from the cloud's 3D positions and stored colours, so it does not require choosing between the two frames. See [section 5](#5-stereo-point-cloud-integration) for the full stereo workflow.
106
+
107
+
The synthesised image is a point-splatting projection: each point's XYZ is projected into pixel coordinates using the camera intrinsics, and its RGB colour is painted onto a canvas. For depth-estimation clouds (one point per pixel) the result is nearly identical to the original photo. For stereo clouds or scans with variable density, sparse or occluded regions produce a patchy image that may reduce detection quality compared to a real photo.
108
+
109
+
> **Camera intrinsics required for non-PrimeSense clouds.** The default intrinsics (`fx=525, cx=319.5, cy=239.5`) match a 640×480 PrimeSense sensor. If your point cloud was generated by a different camera (stereo rig, RealSense, etc.), pass `advanced_config` with the correct values — otherwise back-projection will not align masks with the 3D points. See [Advanced config](#advanced-config).
102
110
103
111
```python
104
112
import open3d as o3d
@@ -167,7 +175,91 @@ for i, ann in enumerate(result.annotations):
167
175
168
176
---
169
177
170
-
## 5. REST API
178
+
## 5. Stereo point cloud integration
179
+
180
+
Point clouds produced by [Stereo Depth](../features/stereo_depth.md) are in camera space (X right, Y down, Z forward, origin at the left camera), which is exactly what this task expects. To annotate a stereo cloud correctly:
181
+
182
+
-**Always pass the stereo camera intrinsics** via `advanced_config`. The default values are for a PrimeSense sensor and will not produce back-projection that matches any other stereo rig.
183
+
-**Do not pass `image_input`** — a stereo cloud comes from two images taken at slightly different viewpoints and there is no single image that represents the combined view. Leave `image_input` unset and the system will synthesise the segmentation image directly from the point cloud's stored colours.
184
+
-**Do not centroid-shift the point cloud** before passing it in. The PLY viewer handles visual centering in JavaScript; shifting the cloud in Python breaks the Z > 0 requirement that back-projection depends on.
185
+
186
+
```python
187
+
import open3d as o3d
188
+
from vizion3d.annotation import ObjectMaskAnnotation3D, ObjectMaskAnnotation3DCommand
189
+
from vizion3d.annotation.models import ObjectMaskAnnotation3DConfig
Copy file name to clipboardExpand all lines: docs/concepts/camera_intrinsics.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,7 +159,7 @@ K = | 0.0 525.0 239.5 |
159
159
| 0.0 0.0 1.0 |
160
160
```
161
161
162
-
For a different camera or resolution, always supply calibrated values — wrong intrinsics produce correct topology but geometrically distorted metric scale.
162
+
For a different camera or resolution, always supply calibrated values — intrinsics that do not match your camera produce correct topology but geometrically distorted metric scale.
163
163
164
164
See the full field reference and per-entry-point usage examples in the Advanced Config pages:
Copy file name to clipboardExpand all lines: docs/features/depth_estimation.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -381,8 +381,6 @@ The same config is available in the REST and gRPC entry points. See [Advanced Co
381
381
382
382
---
383
383
384
-
---
385
-
386
384
## Known limitations
387
385
388
386
-**Relative depth only** — the default monocular backend produces relative (inverse) depth, not metric depth. Point cloud distances are internally consistent but not calibrated to real-world scale without a known reference distance.
Copy file name to clipboardExpand all lines: docs/features/depth_estimation_advanced_config.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ X = (u - cx) * d / fx
16
16
Y = (v - cy) * d / fy
17
17
```
18
18
19
-
All four intrinsic parameters — `fx`, `fy`, `cx`, `cy` — appear in this formula. Getting them wrong produces a point cloud that is geometrically distorted: correct topology but wrong angles, skewed shapes, or objects that appear compressed or stretched.
19
+
All four intrinsic parameters — `fx`, `fy`, `cx`, `cy` — appear in this formula. Values that do not match your camera produce a point cloud that is geometrically distorted: correct topology but skewed angles, compressed shapes, or stretched geometry.
The vertical focal length in pixels. For cameras with square pixels, `fy ≈ fx`. Cameras with non-square sensors may have `fy ≠ fx`.
46
46
47
-
**Effect on the point cloud:** Controls vertical spread analogously to `fx`. Incorrect`fy` produces vertically compressed or stretched geometry.
47
+
**Effect on the point cloud:** Controls vertical spread analogously to `fx`. A`fy` that does not match your sensor produces vertically compressed or stretched geometry.
48
48
49
49
**How to find it:**`K[1][1]` from the calibration matrix, or:
The horizontal image coordinate of the optical axis — ideally the exact centre of the sensor. For a 640-wide image the ideal value is `319.5`; for a 1920-wide image it is typically near `959.5`.
62
62
63
-
**Effect on the point cloud:** Shifts the entire point cloud left or right. A wrong `cx` makes the scene appear to be viewed from an off-centre vantage point, introducing a lateral tilt.
63
+
**Effect on the point cloud:** Shifts the entire point cloud left or right. A `cx`that does not match your sensor makes the scene appear viewed from an off-centre vantage point, introducing a lateral tilt.
64
64
65
65
---
66
66
@@ -70,7 +70,7 @@ The horizontal image coordinate of the optical axis — ideally the exact centre
70
70
71
71
The vertical image coordinate of the optical axis. For a 480-tall image the ideal value is `239.5`.
72
72
73
-
**Effect on the point cloud:** Shifts the entire point cloud up or down. Like `cx`, an incorrect value introduces a tilt — vertical in this case.
73
+
**Effect on the point cloud:** Shifts the entire point cloud up or down. Like `cx`, a value that does not match your sensor introduces a tilt — vertical in this case.
|**Object at 2.4 m reads as 2.4 m**| Yes — if calibration is correct | No — depends on scene content |
34
-
|**Scale factor to world**| 1.0 (accurate) | Unknown, scene-dependent |
35
-
|**`point_cloud_scale` field**| 1.0 (accurate) | 1.0 (misleading — not real metres) |
35
+
|**Scale factor to world**| 1.0 (real) | Unknown, scene-dependent |
36
+
|**`point_cloud_scale` field**| 1.0 (real metres) | 1.0 (relative, not real metres) |
36
37
|**Shape / topology correct**| Yes | Yes, if correct intrinsics supplied via `DepthEstimationAdvanceConfig`|
37
38
|**Camera calibration needed**| Yes — `focal_length`, `baseline`, `cx`, `cy`| Optional — only affects point cloud geometry |
39
+
|**Compatible with annotation task**| ✅ | ✅ back-projection is self-consistent |
40
+
|**Compatible with other 3D tools**| ✅ registration, reconstruction, metric tools | ⚠️ Z ordering is relative — not directly interoperable with metric clouds |
A stereo point cloud is in camera space (Z = metric depth, origin at the left camera), making it directly compatible with [Object Mask Annotation 3D](../annotation/object_mask_annotation_3d.md). Pass the same intrinsics you used for stereo depth. Do not pass `image_input` — the annotation task synthesises the segmentation image from the point cloud's stored colours, which avoids having to pick between the left and right frames.
474
+
475
+
```python
476
+
import open3d as o3d
477
+
from vizion3d.stereo import StereoDepth, StereoDepthCommand, StereoDepthAdvancedConfig
478
+
from vizion3d.annotation import ObjectMaskAnnotation3D, ObjectMaskAnnotation3DCommand
479
+
from vizion3d.annotation.models import ObjectMaskAnnotation3DConfig
480
+
481
+
stereo_result = StereoDepth().run(
482
+
StereoDepthCommand(
483
+
left_image="left.png",
484
+
right_image="right.png",
485
+
return_point_cloud=True,
486
+
advanced_config=StereoDepthAdvancedConfig(
487
+
focal_length=1733.74,
488
+
cx=792.27,
489
+
cy=541.89,
490
+
baseline=536.62,
491
+
),
492
+
)
493
+
)
494
+
495
+
annotation_result = ObjectMaskAnnotation3D().run(
496
+
ObjectMaskAnnotation3DCommand(
497
+
point_cloud=stereo_result.point_cloud,
498
+
return_annotated_cloud=True,
499
+
advanced_config=ObjectMaskAnnotation3DConfig(
500
+
fx=1733.74,
501
+
fy=1733.74,
502
+
cx=792.27,
503
+
cy=541.89,
504
+
),
505
+
)
506
+
)
507
+
508
+
for ann in annotation_result.annotations:
509
+
print(f"{ann.label:20s} conf={ann.confidence:.2f} 3D points={len(ann.point_indices)}")
See [Object Mask Annotation 3D — Stereo integration](../annotation/object_mask_annotation_3d.md#5-stereo-point-cloud-integration) for the full walkthrough.
515
+
516
+
---
517
+
471
518
## Known limitations
472
519
473
-
-**Rectified pairs required** — images must be stereo-rectified so corresponding points lie on the same horizontal scanline. Un-rectified pairs will produce incorrect results.
474
-
-**Metric scale depends on calibration** — an incorrect`baseline` or `focal_length` scales all depth values uniformly. Always use calibrated values for real applications.
520
+
-**Rectified pairs required** — images must be stereo-rectified so corresponding points lie on the same horizontal scanline. Un-rectified pairs will not produce reliable results.
521
+
-**Metric scale depends on calibration** — an inaccurate`baseline` or `focal_length` scales all depth values uniformly. Always use calibrated values for real applications.
475
522
-**Python 3.12 required for Open3D** — `return_depth_image` and `return_point_cloud` require Open3D, which currently only supports Python 3.12 in this project.
0 commit comments