Develop with SDK a pluggin to integrate a camera with visual studio
AnsweredHi friends,
I'm entering into the world of NX to make my own project and I would like to develop a plugin to allow a different camera model to become compatible with NX.
My idea is to integrate an industrial camera, such as Basler, IDS, Dalsa or AVT, into NX and be able to grab images. Another option I would like to know is to develop another plugin to integrate image processing libraries into NX.
I see that this has to be done with SDK libraries in C++. My problem is that I'm not skilled with QT compiler but I do prefer Visual Studio.
Is there any sample or way to start up with a different compiler that QT? running under Windows...if possible.
Thanks a lot in advance
Carles.
-
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
-
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
-
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.cmakenx_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
-
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. -
Hi Stefaan Joos,
Andrey Terentyev isn't aware as well so it would be interesting if Carles Carreté managed to achieve the integration.
-
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. -
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 :-)
-
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.
Please sign in to leave a comment.
Comments
13 comments