SDK Installation and Environment Setup

You are currently viewing the documentation for a pre-release version (2.2.0). To access documentation for other versions, click the "Switch Version" button located in the upper-right corner of the page.

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

This section describes how to set up Mech-Vision SDK for each supported language.

Prerequisites

  • Mech-Vision 2.2.0 or later is installed.

  • SDK files are located in the development subdirectory of the Mech-Vision installation directory.

C++ Environment Setup

System Requirements

  • C version: C17 or later

  • Compiler: MSVC 2017 or later

  • Build tool: CMake 3.20 or later

Configure CMakeLists.txt

Add the following content in CMakeLists.txt to include SDK headers and link the static library:

cmake_minimum_required(VERSION 3.20)

project(my_project)
set(CMAKE_CXX_STANDARD 17)

add_executable(demo demo.cpp)

# Set the SDK path
set(VISION_SDK_DIR path/to/development/cpp)

# Include header directories
target_include_directories(demo PRIVATE ${VISION_SDK_DIR}/include)

# Link the static library
target_link_directories(demo PRIVATE ${VISION_SDK_DIR}/lib)
target_link_libraries(demo PRIVATE mmind_vision_sdk)

Start the Vision Service

Before running your program, start the Vision service.

Method 1: Start manually

path/to/mmind_vision.exe --server

Method 2: Start via SDK API

#include "vision_sdk/vision_sdk.h"
#include <thread>

using namespace mmind;

int main()
{
    vision::initialize();

    vision::startServer();
    std::this_thread::sleep_for(std::chrono::seconds(5));
    vision::closeServer();

    vision::uninitialize();
    return 0;
}

Configuration File

SDK uses a JSON configuration file and supports the following options:

{
    "log_file_name": "vision_sdk_log/vision_sdk.log",
    "log_console": true
}

Pass the configuration file path when calling vision::initialize():

vision::initialize("path/to/config.json");

C# Environment Setup

System Requirements

  • .NET Framework 4.7.2 or later

  • Visual Studio 2017 or later

Configure the Project

  1. Create or open a C# project in Visual Studio.

  2. Add DLL files in development/csharp/lib as project references.

  3. Add the namespace at the top of your code file:

    using MMind.Vision;

Initialize and Uninitialize

using MMind.Vision;

class Program
{
    static void Main(string[] args)
    {
        // Initialize the SDK
        MmindVision.Initialize();

        // ... SDK calls ...

        // Uninitialize the SDK
        MmindVision.Uninitialize();
    }
}

Python Environment Setup

System Requirements

  • Python 3.8 or later

Install the SDK Package

pip install path/to/development/python/dist/mmind_vision-*.whl

Usage Example

import mmind_vision
from mmind_vision import *

def main():
    # SDK calls ...
    pass

if __name__ == '__main__':
    mmind_vision.initialize()
    main()
    mmind_vision.uninitialize()

Is this page helpful?

You can give a feedback in any of the following ways:

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.