How to integrate the opencv to webots environment in windows? - c++

I want to use opencv for a project for robot simulation. But I am having trouble with using it inside webots. I can't include it. I have the opencv version 4.30 and I changed my makefile to use the opencv but It doesn't work. Can You guys help me how can I add opencv to webots?

Here are some documentation about how to use external library with Webots controllers:
https://cyberbotics.com/doc/guide/using-webots-makefiles?tab-language=ros#adding-an-external-library-ccp
You can also find an example of integration of OpenCV (not version 4.30 but you can for sure take inspiration) in a Webots controller here:
https://github.com/cyberbotics/webots/blob/f6886726c320b86d8ab07cab4d849ca82ca791af/projects/samples/howto/vision/controllers/vision/

Related

Yolo: PyTorch vs. Darknet

I have recently found Yolo implementations in PyTorch (e.g. https://github.com/ultralytics/yolov3). What I would like to know if this is really the same (in terms of model accuracy, speed and so on) like the one with Darknet backbone?
I am asking because it is waaaaaay easier with PyTorch (as I am struggling with installing Darknet on windows).
Kind regards,
Can
Follow these step to install darknet framework on window10.
I recommend to clone darknet from AlexeyAB repository since it works great on windows10 and a lot of community support.(https://github.com/AlexeyAB/darknet).
And now it has a python wrapper so you could implement it on python.
Clone darknet repositoriey.
install vcpkg.(https://github.com/microsoft/vcpkg)
Install visual studio 2017.
Install CUDA and CUDNN.
Add CUDNN into system environment. Variable name = 'CUDNN' , variable value =
'installed path'.
Add 'CUDA_TOOLKIT_ROOT_DIR' into system environment. Variable name = 'CUDNN',
variable value = 'installed path\NVIDIA GPU Computing Toolkit\CUDA\v10.2.
build with powershell command '.\build.ps1' in darknet directory.
Hope you find this help :).
YOLO (You Only Look Once) is a one shot detector method to detect object in a certain image. It can work with Darknet, Pytorch, Tensorflow, Keras etc. frameworks. YOLO and darknet complements together pretty well as it has a robust support for CUDA & CUDNN. Use whichever framework you want !!

Get non free modules OpenCV 2.4.13 Windows

I am having problems with OpenCV as I need to use SURF on my C++ Visual Studio 2015 project but apparently is not part of OpenCV 2.4.13 and needs to be downloaded separately.
What I specifically need is this package:
"opencv2/nonfree"
I've been looking over the Internet but I could not find anything, just a few tutorials for Ubuntu.
Does anyone know how to add these modules to the Windows version?
Thank you in advance for your time.

Xamarin.Forms + native library OpenCV

I'm trying to write an application using Xamarin.Forms. But I need to connect to the project native library OpenCV.
In tutorial i see how connect to the ios or android project. But I want use this native library in share code.
Library OpenCV has Android, Linux, Windows, iOS and Source Code versions. I would like to write code for this library once.
this is url for this library http://opencv.org/downloads.html
Please, help solve the problem
I don't think there's a way to have one codebase when using native bindings on iOS and Android. However, you can automate everything by using SWIG (http://www.swig.org). Short example here: http://blog.reblochon.org/2013/01/c-bindings-for-monotouch-using-swig.html
There's also .NET port of OpenCV called EMGU which works fine with Xamarin.

Using both OpenNI and OpenNI2 in the same project

Is possible to use both in the same project? actually they have different classes.
I want to do that because OpenNI2 has the driver for Microsoft Kinect, but the library PCL (Point Cloud Libraries) doesn't work yet with this version of OpennI, so i should use the previous version in order to do use them.
However, if there is a better way to use the kinect and, at the same time, use a library capables of meshing a cloud of point, it could be very helpful
ps: I'm using Visual Studio 2010, 32bits, c++
cheers, Maurizio.
As far as I know Nicolas Burrus nestk library supports both, OpenNI and OpenNI2 and also has a PCL integration.
You may want to check the nestk Homepage or nestk on GitHub. Some useful example can be found in the Wiki.
PCL is going to have OpenNI2 grabber. It is being developed and will be merged soon.

Configuring JSONCPP with cococ2dx

I ma using cocos2d-x with eclipse on mac osx. I am trying to configure JSON cpp into my cocos2d-X game. Can anyone tell me how i can integrate the library into my project ?
Cocos2d-x 2.2 and earlier versions has already support for jsoncpp library and it is used in Cocos2d-x extensions. Just check the Coco-Studio examples in TestCpp project.
Or you can take reference from extensions\CocoStudio\Reader\SceneReader.cpp which reads json file to load a scene.