Settings Selector based on Capture Speed

This section provides detailed guidance on the best camera settings based on your time budget from when you trigger an acquisition until you get the point cloud. Here we also consider your PC specs because data transfer and point cloud processing depend on that as well. We address settings for 3D captures to get good point clouds and 2D captures to get good color images.

You have determined which Zivid camera to use for your Piece Picking application, and you have mounted it and positioned it correctly. The next step is to select the camera settings that meet your cycle time requirements, given your PC specs. If you haven’t got a PC yet, then this section is also about finding the PC specs that will meet your capture time requirements in combination with the settings used.

3D settings

We have split the Piece Picking application into two categories based on scene complexity. For each category, we specify and recommend settings that meet the given imaging requirements and capture speed requirements.

Piece Picking (Quality)

With Quality settings for Piece Picking, the camera covers a reasonably wide dynamic range, providing good point clouds for a large variety of objects. The scene can, in this case, include anything from bright and reflective plastic-wrapped objects and items in poly bags to dark absorptive material. The image below depicts a typical complex piece picking scene that requires Quality settings.

Piece picking scene - Quality settings

Tip

If you want to be sure that the camera will not miss seeing anything, choose Quality settings.

Piece Picking (Fast)

If your scene does not consist of very bright, shiny, and dark objects, you can save significant cycle time by choosing Fast settings for Piece Picking. The Fast settings cover a narrower dynamic range but provide faster captures. Here is an example of a scene where Fast settings work well. As you can see, there are no items that cause strong direct reflections, highlights and saturation, and there are no very dark items.

Piece picking scene - Fast settings

Tip

If there are no bright, shiny, and dark items in your scene, choose Fast settings.

For a parcel picking application, you can also choose Fast settings to achieve the shortest cycle times. These settings have a limited dynamic range but are good enough for objects that are relatively straightforward for imaging, for example:

  • cardboard boxes

  • white envelopes

  • carton envelopes

Parcel picking scene - Fast settings

Tip

If you are only imaging boxes, parcels, satchels, etc., choose Fast settings.

Settings Selector Table

The following table represents a settings selector tool based on the required capture time budget. The same table indicates the performance and thus the cost of a PC that can meet your capture speed requirements. Check out Recommended Industrial PCs to see examples of High-End, Mid-End, and Low-End configurations.

Application

Capture Time (2D + 3D)

Camera Settings

High-End PC

Mid-End PC

Low-End PC

Piece Picking (Quality)

~600 ms

~700 ms

~800 ms

Z2 M70 Quality

Z2 L100 Quality

Z1+ M Quality

Z1+ L Quality

Piece Picking (Fast)

~250 ms

~350 ms

~450 ms

Z2 M70 Fast

Z2 L100 Fast

Z1+ M Fast

Z1+ L Fast

To demonstrate reaching the above requirements for piece picking we continuously run benchmark capture programs with our cameras on various PCs. The following table shows the results.

Expected median (±stddev) in ms

Piece Picking Settings

Zivid One+

Zivid Two

Intel UHD 750

Intel UHD G1

NVIDIA 3070

Intel UHD 750

Intel UHD G1

NVIDIA 3070

High-end [1]

Low-end [2]

High-end [3]

High-end [1]

Low-end [2]

High-end [3]

Z2 M70 Fast

NA

NA

NA

233 (±3) ms

421 (±274) ms

112 (±0.7) ms

Z2 L100 Fast

NA

NA

NA

230 (±3) ms

428 (±291) ms

112 (±0.7) ms

Z1+ M Fast

231 (±3) ms

329 (±2) ms

112 (±2) ms

NA

NA

NA

Z1+ L Fast

230 (±3) ms

328 (±1) ms

112 (±0.7) ms

NA

NA

NA

Z2 M70 Fast Stripe

NA

NA

NA

531 (±2) ms

989 (±431) ms

274 (±2) ms

Z2 L100 Fast Stripe

NA

NA

NA

532 (±2) ms

1009 (±441) ms

274 (±1) ms

Z1+ M Fast Stripe

516 (±2) ms

704 (±3) ms

279 (±0.6) ms

NA

NA

NA

Z1+ L Fast Stripe

517 (±2) ms

703 (±4) ms

278 (±2) ms

NA

NA

NA

Z2 M70 Quality

NA

NA

NA

477 (±5) ms

744 (±384) ms

276 (±2) ms

Z2 L100 Quality

NA

NA

NA

498 (±3) ms

760 (±389) ms

301 (±1) ms

Z1+ M Quality

468 (±2) ms

670 (±6) ms

292 (±1) ms

NA

NA

NA

Z1+ L Quality

511 (±2) ms

715 (±8) ms

339 (±2) ms

NA

NA

NA

Z2 M70 Quality Stripe

NA

NA

NA

1018 (±33) ms

1655 (±441) ms

623 (±3) ms

Z2 L100 Quality Stripe

NA

NA

NA

1059 (±12) ms

1665 (±484) ms

688 (±2) ms

Z1+ M Quality Stripe

1098 (±6) ms

1439 (±31) ms

612 (±3) ms

NA

NA

NA

Z1+ L Quality Stripe

1140 (±5) ms

1481 (±39) ms

656 (±2) ms

NA

NA

NA

Testing 3D Settings

We can use Zivid Studio to test 3D settings.

To import the settings in Zivid Studio:

  • Click on FileImport Capture Settings

  • Navigate to the location of your settings file

  • Click Open

Tip

Drag and drop a YML file to import the settings to Zivid Studio - added in Zivid SDK 2.5.

Settings can be loaded using the Zivid SDK as well.

Go to source

source

std::cout << "Loading settings from file" << std::endl;
const auto cameraModel = camera.info().model().toString().substr(0, 8);
const auto settingsFile = std::string(ZIVID_SAMPLE_DATA_DIR) + "/Settings/" + cameraModel + "/Settings01.yml";
const auto settings = Zivid::Settings(settingsFile);
Go to source

source

Console.WriteLine("Loading settings from file");
var cameraModel = camera.Info.Model.ToString().Substring(0, 8);
var settingsFile = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)
                   + "/Zivid/Settings/" + cameraModel + "/Settings01.yml";
var settings = new Zivid.NET.Settings(settingsFile);
Go to source

source

print("Loading settings from file")
settings_file = Path(user_options.settings_path)
settings = zivid.Settings.load(settings_file)

2D settings

Although you get color images through 3D captures, they may not be adequate for your 2D application due to the light from the projector of the camera. You can read more about this in 2D + 3D Capture Strategy. We provide two options for acquiring 2D settings for your Piece Picking application:

  • Get 2D settings automatically using the Zivid calibration board with a code sample

  • Use a look-up table and find your appropriate 2D settings

Automatic 2D Settings

Run the auto_2d_settings.py sample to automatically find the acquisition settings and color balance for a 2D capture using a Zivid calibration board. Place the calibration board at either the top or bottom of the bin and run the sample by specifying the calibration board location and the desired focus range (bin height) as command line arguments. If you, for example, place the calibration board at the bin top and the bin height is 400 mm, run the sample as:

python auto_2d_settings.py --desired-focus-range 400 --checkerboard-at-start-of-range

If you place the calibration board at the bin bottom, run:

python auto_2d_settings.py --desired-focus-range 400 --checkerboard-at-end-of-range

This sample does not use the internal projector when finding 2D settings by default, but this can be set by the optional argument --use-projector. Additionally, you can choose to not balance colors by the optional argument --no-color-balance. Since the sample calibrates with the ambient light in the scene you should use similar lighting conditions as in your actual application.

Settings Selector Table

The table below is a settings selector tool for 2D settings based on the illuminance at the bottom of the bin and the distance to the bin top. These 2D settings assume not using the internal projector as the light source, only the external light source.

To use the table, first determine the illuminance at the bottom of the bin given the expected lighting conditions. Then, choose the settings based on the distance from the camera to the bin top.

Note

Illuminance, measured in lux (lx), is the total luminous power incident on a surface per unit area. Luminous power, measured in lumen (lm), is a measure of the total quantity of visible light emitted by a source per unit of time.

lux measurement

Tip

You can roughly measure the illuminance in the scene with a light meter app for Android or Apple; for an accurate measurement, you need a Light / Lux Meter.

At bin bottom

To bin top

600 mm

800 mm

1100 mm

1400 mm

1700 mm

1900 mm

~300 lx

Zivid Two M70

Zivid Two M70

Zivid Two L100

Zivid One+ M

Zivid One+ L

Zivid One+ L

Zivid Two L100

Zivid One+ M

Zivid One+ L

Zivid One+ M

~1000 lx

Zivid Two M70

Zivid Two M70

Zivid Two L100

Zivid One+ M

Zivid One+ L

Zivid One+ L

Zivid Two L100

Zivid One+ M

Zivid One+ L

Zivid One+ M

Tip

To benchmark 3D and/or 2D settings on your PC, you can run ZividBenchmark.cpp sample with settings loaded from YML files. Go to Samples, and select C++ for instructions.

Testing 2D Settings

To test 2D settings, you can run our code sample to capture 2D images with settings from YML file.

First, we provide the path to the 2D acquisition settings.

Go to source

source

def _options() -> argparse.Namespace:
    """Configure and take command line arguments from user.

    Returns:
        Arguments from user

    """
    parser = argparse.ArgumentParser(
        description=(
            "Balance the color of a 2D image\n"
            "Example:\n"
            "\t $ python color_balance.py path/to/settings.yml\n\n"
            "where path/to/settings.yml is the path to the 2D acquisition settings you want to find color balance for."
        ),
        formatter_class=argparse.RawTextHelpFormatter,
    )

    parser.add_argument(
        dest="path",
        type=Path,
        help="Path to YML containing 2D capture settings",
    )

    return parser.parse_args()

Then, we connect to the camera, load the 2D settings, capture the image, and display it.

Go to source

source

user_options = _options()
camera = app.connect_camera()
settings_2d = zivid.Settings2D.load(user_options.path)
with camera.capture(settings_2d) as frame_2d:
    image = frame_2d.image_rgba()
    rgba = image.copy_data()
    display_rgb(rgba[:, :, 0:3], title="RGB image", block=True)

Lastly, the image is saved.

Go to source

source

image_file = "Image.png"
print(f"Saving 2D color image to file: {image_file}")
image.save(image_file)

Note

We have tested the 3D and 2D settings we recommend for the above typical scenes in low (~300 lx) and high (~1000 lx) ambient light conditions. This we have done for the range of distances that we specify in the Camera Selector section, and all with various items in the scene. Therefore, we are confident that these settings will work the majority of scenes that fit into these categories. However, if you know exactly what items you expect in your scene and you are an expert camera user, you can manually configure settings to optimize them for your case. Check out Capturing High Quality Point Clouds to learn how to do that.

In the next section, we cover machine vision processes we recommend carrying out to help you prepare your Zivid camera for production.