How to Get Good 3D Data on a Pixel of Interest¶
Introduction¶
Objects that you are imaging can have vastly different brightness levels from pixel to pixel, and two conditions must be satisfied for the Zivid camera to calculate the distance:
The brightness of the pixel must be within the measurable range of the sensor, i.e higher than 0 and lower than 255. If the brightness is 0 or 255, then it becomes impossible to distinguish whether the real intensity is for example 255, 275 or 10000. This is because all values outside of the scale will be assigned the lowest or highest possible value.
The signal to noise ratio of the projected pattern in that pixel must be large enough for the camera to decode the signal. It must also be small enough so that the peak-to-peak intensity of that signal can be captured within the dynamic range of the camera. This means that the camera must be able to distinguish a difference when the projected light is on and off.
Evaluating the exposure of a pixel by color¶
These conditions should be satisfied by exposing a pixel such that the color value in that pixel is between 32 and 255. In order to satisfy these conditions for all pixels of interest within an image, it may be necessary to utilize the HDR function. The HDR function allows you to optimize exposure conditions for certain brightness regions of the image at a time.
Note
Try to keep the RGB values between 32 and 255 for each color channel for good SNR.
When optimizing your 3D data for a particular pixel or limited region, you can use the 2D view in Zivid Studio as seen below. By hovering the mouse above the region of interest (exemplified by the red cross), the pixel coordinates, RGB and SNR information will be displayed in the bottom left corner.
Note
In order to be able to use RGB value correctly, evaluate a single acquisition at a time. In addition, disable Tone Mapping and set Gamma to 1.
The RGB values of this particular pixel will be binned together with other pixels that have similar RGB values in the histogram view. As it can be seen in the image above, pixel (783, 526) has:
Red value of 224
Green value of 238
Blue value of 215
SNR of 103.8
This means that this pixel resides within the upper right half of the histogram, between values 32 and 255 and is thus to be considered a good pixel. Further more, we can see that 95.1% of the image resides between 32 and 255 as highlighted, meaning that almost the entire image is well exposed for good 3D quality.
Evaluating the exposure of a pixel by SNR¶
The second way to evaluate the pixels are by SNR value. This is what the noise filter in the Zivid API does. It is depicted in the first image in this article above. While the RGB color values are a measure of the average brightness of a 3D capture, the SNR tells us something about the signal-to-noise ratio of the 3D data. RGB color values and the SNR values are tightly connected. SNR should be above 7 to yield good precision. However, an SNR lower than 7 can be common in presence of strong ambient light or dark and specular objects. This simply means that the pixel will be more noisy from measurement to measurement and between pixel-to-pixel.
Note
For good 3D precision, SNR should be higher than 7.
Further reading
Continue to the advanced topic: Dealing with Highlights and Shiny Objects.