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.

Consumer Goods (Quality)

With Quality settings for Consumer Goods, 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 Consumer Goods scene that requires Quality settings.

Consumer Goods scene - Quality settings

Tip

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

Consumer Goods (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.

Consumer Goods 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 should choose Parcels Matte 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 - Matte settings

Tip

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

For more challenging scenes, try out Parcels Reflective 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

Consumer Goods (Quality)

~500 ms

~750 ms

~1000 ms

Z2 M70 Quality

Z2 L100 Quality

Z1+ M Quality

Z1+ L Quality

Consumer Goods (Fast)

~300 ms

~600 ms

~900 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

Consumer Goods 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

556 (±9) ms

947 (±379) ms

280 (±4) ms

Z2 L100 Fast

NA

NA

NA

558 (±9) ms

949 (±394) ms

281 (±5) ms

Z1+ M Fast

586 (±2) ms

903 (±4) ms

342 (±1) ms

NA

NA

NA

Z1+ L Fast

586 (±2) ms

901 (±4) ms

342 (±1) ms

NA

NA

NA

Z2 M70 Quality

NA

NA

NA

695 (±4) ms

1089 (±408) ms

431 (±3) ms

Z2 L100 Quality

NA

NA

NA

694 (±4) ms

1087 (±419) ms

433 (±5) ms

Z1+ M Quality

1053 (±3) ms

1533 (±14) ms

656 (±2) ms

NA

NA

NA

Z1+ L Quality

1064 (±5) ms

1538 (±15) ms

664 (±1) 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 Optimizing Robot Cycle Times for speed by making use of multithreading.