Develop with SDK a pluggin to integrate a camera with visual studio

Answered

Comments

13 comments

  • Avatar
    Mike Shevchenko

    Hi Carles,

    Of course, you can use Visual Studio for any plugin development tasks. Using the Qt Creator IDE is not required, though is possible for those who like it.

    Please note that the Qt library is not directly related to using the Qt Creator IDE - it can be used with any IDE and C++ compiler.

    As for Video Source SDK, the Qt library is required for only one of our samples, namely, axis_camera_plugin. The Qt library is NOT required by the SDK itself. If you don't want to use axis_sample_plugin as a base for your plugin, you can simply move it out of the `samples` directory, and run `build_samples.bat` - it will build other samples without the need to have the Qt library.

    In future versions, we will consider to implement the command-line option for sample building scripts like `--no-qt`, which will build only plugins that do not require the Qt library.

    Regards,

    Mike S

    Lead Developer of SDKs and APIs

    0
    Comment actions Permalink
  • Avatar
    Carles Carreté

    Hi Mike,

    I finally could compile the cmakelist.txt file located in "...\video_source_sdk\nx_kit".

    It generates a set of Visual Studio projects like this:

    Then, I successfully could compile the project named as "image_library_pluggin". It turned out to a dll file, which I guess it runs. I haven't test yet.

    now, if I want to include a set of functions to interact with a camera  you suggested me to have a look at the axis sample, which needs of a QT library. 

    How do I must proceed, in your opinion, to include a driver, such as the one included in a .h file? I'm trying to include a camera from IDS and try provide with samples written in C++ to do it.

    In the manual of the camera SDK there can be read:

    <<

    The uEye.h header file

    The uEye.h header file contains all the definitions and constants needed for the uEye API. After the installation of the uEye drivers you will find this file in the directory:

    Windows: C:\Program Files\IDS\uEye\Develop\include

    Linux: /usr/include

    >>

    looks pretty simple to work with. I know that with Visual Studio is quite easy but...how do I port this to NX plugin? 

    I kindly ask you for some guidance on it.... :)

    Thanks in advance

    Bst regards,

    Carles

     

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello Carles ,

    Let's sum up. The Video source SDK archive is supposed to result after extraction into a directory with the following content

    docs
    licenses
    nx_kit
    samples
    src
    build_samples.bat
    build_samples.sh
    build_samples_arm32.sh
    build_samples_arm64.sh
    build_samples_rpi.sh
    Doxyfile
    readme.md
    toolchain_arm32.cmake
    toolchain_arm64.cmake

    nx_kit - contains a source code of SDK library to be used by all the plugins and is compiled automatically with all the provided examples.

    samples - contains a source code of several example plugins, each of them can be build separately.

    build_samples.bat - a script for building all the plugins stored in the "samples" directory at once and requires Qt library to be installed, because axis_sample_plugin depends on it.

    For instance, to build image_library_plugin only you could run the following commands:

    cd d:\kk\carles\nx\video_source_sdk\samples\image_library_plugin
    mkdir build && cd build
    cmake -DCMAKE_BUILD_TYPE=Release ../src/
    cmake --build .

    cmake -DCMAKE_BUILD_TYPE=Release ../src/ - will generate Visutal Studio solution file *.sln of the image_library_plugin, which you could open in VS for reviewing, editing and building/rebuilding.

    This project could be your starting point for developing your own plugin. In particular, you could add additional include directories (see a screenshot)

    Although, the axis_sample_plugin requires Qt library to be installed on your Windows OS, the plugin could be built likewise. The Qt library is downloadable here https://www.qt.io/offline-installers

    0
    Comment actions Permalink
  • Avatar
    jan van de velde

    hello!

    I have been looking into doing something similar to what you guys are talking about.

    So i have been wondering, if there was any progress or new developments on this project ?

    I would be very great full for any and all information you guys are wiling to share.

    kind regards!

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello Jan,

    > So i have been wondering, if there was any progress or new developments on this project ?

    What project in particular do you mean?

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello Stefaan,

    Could you please elaborate what are you asking about?

    0
    Comment actions Permalink
  • Avatar
    Norman - Nx Support

    Hi Stefaan Joos,

    Currently, there are no plans to integrate Basler, IDS, or any other machine vision cameras. 
    Current camera integrations that is being worked on are Bosch, Axis, Dahua (thermal). To be honest I do not expect any integration of machine vision cameras soon. 

    0
    Comment actions Permalink
  • Avatar
    Stefaan Joos

    Hi Norman,

    I'm wondering how Carles did it, so i can learn and do it ourselves.

    If Andrey knows how it is done, maybe he could sent some information.

    0
    Comment actions Permalink
  • Avatar
    Norman - Nx Support

    Hi Stefaan Joos,

    Andrey Terentyev isn't aware as well so it would be interesting if Carles Carreté managed to achieve the integration. 

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Stefaan,

    The general approach to integration of cameras with Nx is developing camera plugin with Videosource SDK, aka camera driver.
    This implies utilization of specific manufacturer's camera API.
    As it was shown above the SDK is supplied with several examples of how to organize the driver's code, but the comprehension and invocation of the actual API from the driver's code is up to the developer.

    0
    Comment actions Permalink
  • Avatar
    Stefaan Joos

    Andrey Terentyev Norman - Nx Support

    we did the full integration of Basler usb and ethernet like you explained

    we used the axis integration as an example

    NX now has a basler integration :-)

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello,

    That's great to know!

    Congratulations!

    0
    Comment actions Permalink
  • Avatar
    Norman - Nx Support

    Really Nice Stefaan Joos

    Would you be so kind to submit it to my.networkoptix.com/#/integrations so all Nx users can request the integration from you? 

    I really like the Basler cameras, they are beautifully engineered. I used quite a few of them when they introduced their IP surveillance cameras, somewhere in 2009/2010 or so. 

    0
    Comment actions Permalink

Please sign in to leave a comment.