Region of Interest
The Region of Interest (ROI) removes points outside a user-defined region of interest and can reduce capture time. The ROI can either be a box in 3D, a range of z-values from the camera, or both.
A ROI is helpful if the application only requires a portion of the field of view and not the entire scene. If you, for example, want to detect parts in a bin, your detection algorithms may benefit from the reduced search space inside the bin rather than the whole scene.
ROI as a Box
ROI box filtering benefits
ROI box filtering provides one of the following benefits:
- Reduced capture time (same point cloud quality)
There is less data to transfer, copy, and process; significant speed-ups are realized with one or both:
Weak GPU (Intel/Jetson)
Heavy point cloud processing (Omni/Stripe, 5MP resolution, multi-acquisition HDR)
- Better point cloud quality (same capture time)
Different settings can be used; for example:
Stripe/Omni engine instead of Phase
Higher resolution with Sampling::Pixel
Adding more acquisitions in HDR
- Cheaper GPU (same capture time)
With less data to process, the processing can be slower, allowing you to use, for example:
Intel/Jetson instead of dedicated Nvidia
- Cheaper Network Card (same capture time)
With less data to transfer you may not saturate the network, allowing you to use, for example:
1G instead of 2.5G/10G
2.5G instead of 10G
The parameter RegionOfInterest::Box
enables using ROI as a box.
Three points define the base plane of the box and two extents define the height:
The three points (
Box::PointO
,Box::PointA
,Box::PointB
) are given in the camera frame of reference in 3D and define the base plane of the box. A fourth point is automatically found to bind the base plane into a frame and complete the rectangle. The three points constitute two vectors in order:Point O is the origin of the vectors.
Point A spans the first vector from the origin.
Point B spans the second vector from the origin.
The two extents (
Box::Extents
) extrude the base frame into a box. The cross-product of vectors OA and OB defined by Point O, Point A and Point B gives the direction of the extents. A negative extent will therefore extrude in the opposite direction of the cross-product.
Note
The base frame of the box is not constrained to a rectangle with perpendicular corners. It is therefore possible to make a parallelogram as the base, and a parallelepiped as the box.
Tip
Use the following steps when selecting the three points as a rule of thumb:
Select Point O in an arbitrary corner.
Select Point A such that Point B lies in a position counter-clockwise to Point A.
Select Point B in a position counter-clockwise to Point A.
This way the extents will have a positive direction towards the camera.
Performance
ROI box filtering can significantly reduce capture time. The majority of time-saving is on point cloud processing when using one or more components in the table below. There is additional capture time saving for low exposure times (~<3000 us).
Time saving |
GPU |
Vision Engine |
Sampling::Pixel |
HDR |
---|---|---|---|---|
Significant |
Low-end Intel & Jetson |
Omni |
Full resolution |
More acquisitions more saving |
Moderate |
High-end Intel & Jetson |
Stripe |
2x2 subsampled |
|
Minimal |
Dedicated Nvidia |
Phase |
4x4 subsampled |
The smaller the ROI, the shorter the capture time. Having ROI with fewer pixel rows provides slightly faster captures compared to ROI with fewer pixel columns.
Robot Picking example
Here is an example of heavy point cloud processing using a low-end PC (Nvidia MX 250 laptop GPU and a 1G network card) where ROI box filtering is very beneficial.
Imagine a robot picking from a 600 x 400 x 300 mm bin with a stationary-mounted Zivid 2+ MR130 camera. For good robot clearance, the camera is mounted at 1700 mm distance from the bin top, providing a FOV of approximately 1000 x 800 mm. With the camera mounted at this distance, a lot of the FOV is outside of the ROI, allowing one to crop ~20/25% of pixel columns/rows from each side. As can be seen from the table below, the capture time can be significantly reduced with ROI box filtering.
Presets |
Acquisition Time |
Capture Time |
||
---|---|---|---|---|
No ROI |
ROI |
No ROI |
ROI |
|
Manufacturing Specular |
0.64 s |
0.64 s |
2.1 s |
1.0 s |
Consumer Goods Quality |
0.90 s |
0.88 s |
5.0 s |
3.0 s |
Robot Guidance / Assembly example
Here is an example of heavy point cloud processing using a low-end PC (Nvidia MX 250 laptop GPU and a 1G network card) where ROI box filtering is very beneficial.
In some applications in robot guidance (e.g., drilling, welding, gluing) or assembly (e.g., peg-in-hole), the ROI can be very small compared to the FOV of the camera at imaging distance. In such scenarios, with ROIs often comprising only 5-10% of the points in the point cloud, the capture time can drastically be reduced utilizing ROI box filtering (see table below).
Presets |
Acquisition Time |
Capture Time |
||
---|---|---|---|---|
No ROI |
ROI |
No ROI |
ROI |
|
Manufacturing Specular |
0.65 s |
0.63 s |
1.3 s |
0.7 s |
Manufacturing Small Features |
0.70 s |
0.65 s |
5.0 s |
0.8 s |
ROI as a Depth Range
The parameter RegionOfInterest::Depth
enables to use ROI as a range of z-values from the camera, where points are kept within the following thresholds:
minimum depth threshold (
RegionOfInterest::Depth::minValue
)maximum depth threshold (
RegionOfInterest::Depth::maxValue
)
This is useful if you have points in the foreground or background of the scene that you want to filter out. Note that the z-values are given in the camera frame of reference and will therefore filter perpendicularly to the camera. This will thus work best if the camera is mounted perpendicularly to the objects you want to capture.
Performance
ROI as a Depth Range does not reduce the capture time. It is applied post-process and will increase capture time by a couple of milliseconds. It is, however, applied directly on the GPU and is likely faster than a third-party implementation.
ROI as a Depth Map adds the following processing time per 3D capture:
Check out Region of Interest Tutorial for a more in-depth tutorial on using ROI for your application.
Version History
SDK |
Changes |
---|---|
2.12.0 |
ROI box filtering reduces capture time. |
2.9.0 |
ROI API is added. |