C# (Windows)

You are currently viewing the documentation for version 2.0.3. To access documentation for other versions, click the "Switch Version" button located in the upper-right corner of the page.

■ To use the latest version, visit the Mech-Mind Download Center to download it.

■ If you're unsure about the version of the product you are using, please contact Mech-Mind Technical Support for assistance.

Sample List

Two categories of samples are provided: Basic and Advanced.

  • Basic: samples using models exported from Mech-DLK to do inference of single images and simultaneous inference of images, as well as obtain and visualize results.

    • ImageInfer

      A sample for inference of single images (both single models and cascaded models are supported)

    • MultiImageInfer

      A sample for simultaneous inference of images (both single models and cascaded models are supported)

  • Advanced: samples demonstrating collaborative development of Mech-DLK SDK with HALCON/OpenCV.

Prerequisites

The usage of C# samples in Mech-DLK SDK is based on the following prerequisites:

Install Required Software

The usage of the C# samples in Mech-DLK SDK requires the installation of Mech-DLK SDK and Visual Studio.

Install Mech-DLK SDK

Please obtain the latest Mech-DLK SDK and the third-party libraries and resources it depends upon according to the Installation Guide.

Install Visual Studio (Version 2017 or Above)

  1. Download the Visual Studio installer.

  2. During installation, please select .NET desktop development in the Desktop & Mobile category. Then, click Install in the lower-right corner.

    sample csharp workload

Add Environment Variables

You can add the related environment variables by the following steps.

  1. Right-click This PC on the desktop and select Properties.

  2. Click Advanced system settings and on the Advanced tab of the pop-up System Properties dialog box, click Environment Variables to open the Environment Variables dialog box.

  3. In the System Properties box, click New and in the pop-up box of New System Variable, enter MECHDL_DIR in the text field of Variable name and xxx/mechdlk_sdk in the text field of Variable value. Then, click OK.

  4. In the System Properties box, scroll to Path and double-click it to show the Edit System Variable dialog box.

  5. Click New in the upper-right corner, and add %MECHDL_DIR%. Then, click OK in the lower-right corner.

If you can find %MMIND_DLK% in the Edit System Variable dialog box, select it and click Delete on the right to remove this variable.
csharp add environment variables 1
csharp add environment variables 2

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.