Curious about how opencv_cudaoptflow.lib, where to find it or make? - opencv

I am about to try YOLO as dll in Win10, x64, opencv 3.4.0, CUDA 10, MSVS 2015 as suggested here.
All the steps are done but when I build I have an error
The curious part for me is I couldn't find that opencv_cudaoptflow340.lib anywhere, not in the CUDA folders, not in the opencv340 (where my opencv resides), not even in the whole PC. So, naturally I tried to find it on the web, no luck. Only possible solution seemed to be this with CMake building. Obviously I followed it, however, CMake didn't give an opencv_cudaoptflow340.lib option at all.
How should I approach to find/make/create this .lib file?
I would like to see your experiences on this.
I think this would help others too.
Cheers!

Related

opencv not able to run some advanced image processing code

i am using visual studio 15
some basic blurring and filters are running perfectly but on some codes such as blending and dct techniques are not running
Can anyone please help me
At this point its probably best to create your own compiled library tools for MicroSoft Visual Studio 15. Here's a how to guide. That guide covers all the steps and starts with the most current code on Github.
Also note there are many tutorials out there on OpenCV. Many parts of the OpenCV library have been update, or replaced. You have to be careful that the commands you are using are valid in OpenCV 3.x
Compile your own, run a few simple programs.
If you want specific help here, you MUST post your code, and the errors you are seeing.

How to setup OpenNI 2.0 with OpenCV for a Kinect project?

I am working on my final year project. I need to work with Kinect to detect hand movements. I have tried a few ways and got some results, however, none was enough to meet the needs of the project. I saw this video long ago, and just got to know that they open sourced it recently. So I gave it a try.
My problem now is how to set things up.
The above awesome project uses OpenNI with Kinect. I tried to follow OpenCV tutorials to build it from source code, to let OpenCV work with OpenNI.
Problems:
It says "For the OpenNI Framework you need to install both the development build and the PrimeSensor Module." but as I followed the links some of them were dead. Seems like OpenNI 2.0 doesn't use PrimeSensor any longer.
It also says that in Cmake folders, one is OpenCV/Src, the other is /build. But the OpenCV I downloaded doesn't have anything as Src folder.
Still I used the whole folder as Src, and built it to a build folder and checked WITH OPENNI. I used the Include and Lib folder in OpenNI2 I downloaded, but when I built the OpenCV solution (already generated from CMake) all builds failed.
Also, while generating with Cmake, even if my future OpenCV solution had been successfully built (which wasn't the case), Cmake would have kept telling me how PrimeSense was not available, which made me feel so insecure. :(
I am a bit confused about 32- and 64-bit. The above project I want to follow says it works on 64-bit. But I use MS C++ Express, all projects are 32-bit. So which PrimeSense drivers (given in OpenNI2) should I use?
Could anyone please tell me how to set all these things (OpenNI2.0, OpenCV 2.4.3, PrimeSense) together so I can work with Kinect?
A while back I wrote two tutorials on 1) how to set up OpenNI 1.5 with NITE 2) How to compile OpenCV with OpenNI support.
These can be found here and here
I know this is not what you asked for, but the process of compiling OpenCV with OpenNI 2.0 should be similar and might help you understand where you are going wrong.
I will try to write a newer tutorial, however since I currently do not have access to a sensor, I might not be able to test if it works out in the end.
EDIT:
I have written some code to access Kinect data streams in OpenCV Mat format using OpenNI 2.x. The code github repo can be found here. Detailed guidance on how to set everything up can be found here.
OpenNI 2.x is much advanced than the previous versions. You don't need to install primesense sensorkinect driver. You can use OpenNI 2.x along with the Microsoft Kinect SDK 1.x.
Install both 64 and 32-bit OpenNI 2.x if you have Windows 7 x64 otherwise only 32-bit. Configure it with Visual Studio 2010 or 12. You can follow this video:
http://www.youtube.com/watch?v=ACqPsV0R4to
Then configure OpenCV for visual Studio 2010 or 12. You can follow this link:
http://4someonehelp.blogspot.in/2013/04/install-opencv-245-using-visual-studio.html
Thanks

OpenCV 2.4.2 library files using CMake and MinGW - Target IDE CodeBlocks

I have been having this issue with OpenCV 2.4.2 that it doesn't really get installed properly with Microsoft VS 2010 Express; It is always missing a dll file or two doesn't matter what I follow by Googling. Also, Visual Studio 2010 Express is only valid for a few days, so it is acceptable that VS will not behave well with OpenCV at that point. However, when I changed my IDE to CodeBlocks, it is even stranger because now I have missing dll files and also "Missing Entry Point" error because of a duplicate .dll file. I found this guide and followed what it told me to do:
http://conanhung.wordpress.com/2012/05/23/opencv-2-2c-codeblocks-and-mingw-got-it-working-on-windows/
But it still doesn't work!! What I am after is a complete and definitive solution to integrating OpenCV (preferrably 2.4.2 version) on a Windows 7 64-bit machine. I have been turning Stackoverflow inside out but no solution is working for me. The problems are
WHEN USING VISUAL STUDIO:
Missing dll file (e.g. libopencv_core242d.dll, etc.)
WHEN USING CODE BLOCKS:
First it complains that libstdc++-6.dll is missing. When I download it to my C:\MinGW\libexec\gcc\mingw32\4.7.0 folder, it stops complaining about this. But now it complains that there is any entry point problem and some other .dll file is missing!!!
If someone has managed to make it work by hook or crook, I will be more than happy to know what it is, IN DEPTH. I don't believe that such an important library can be so stupidly distributed so that developers have to struggle night and day to make this work.
FYI, I have tried even the OPenCV website and frankly their instructions are a bit useless. Also, all the necessary information e.g. adding PATH, adding includes and libraries, etc. Please someone point me to the right direction as it has been two days and I cannot get anywhere. It is literally stopping my job now :(
As an answer, but probably a very simple one, I did the following and got rid of the problem:
1) Uninstalled code::blocks completely from the PC and downloaded the IDE-only version (i.e. withouth MinGW compiler), then installed it.
2) Downloaded the latest stable version of MinGW, installed, and added C:\MinGW\bin to PATH
3) Followed rest of the instructions from [link] http://conanhung.wordpress.com/2012/05/23/opencv-2-2c-codeblocks-and-mingw-got-it-working-on-windows/
4) Just to be sure, copied the opencv .dll files from the build folder (i.e. the one that you have created "make" and "install" files using CMake) to the debug (i.e. the executables') folder.
This will fix the problems. In case, it doesn't it might be that you need to add some environment variables.

What is windows system path?-About Devcpp Opencv

I've looked into it through older questions and by using google, but I can't find an asnwe to my problem.
I have been trying to get devcpp to work with opencv2.1. I configured it with cmake and generated files. Then I compiled it with Mingw32-make command through a windows 7 cmd. Whichever way I tried to link stuff from devcpp, it's never worked. It keeps giving me cv::freecast(void) error.
I have seen some people talking about setting things to the system path. What is that system path exactly ?
Thanks in advance.
You have to tell Windows where to look for the openCV libraries when asked. There are two options:
Not to tell windows where to look for the .dll and put them in the same folder as the project
Tell windows where are the .dll by adding them to the system path
Here in "Compile using Visual Studio" point 3 you can see how to do it.

OpenCV 2.1 Strange Errors

I'm not sure if this is the right place for asking these kind of question but I have no better place in mind.
After LOTS of coding in OpenCV, I'm trying to migrate to new C++ interface of openCV which has been introduced in OpenCV 2.0. but I keep getting strange errors.
For example:
trying to use pre-built dlls and libs, I got exceptions in "cv::warpAffine" and "findContours" cv::function at runtime. I compiled the openCV, used my own build of libs and dlls and everything got fixed!
the same problem happened in linux.
linking the "Debug" built dlls with "Release" built of program cause some unexpected runtime errors, and vice versa.
and some other errors.
can anyone helping me with what I'm doing wrong? (please keep in mind that I coded alot with older version of openCV).
When I migrated to C++ interface I couldnt make openCV work until I compiled the source by myself. Probably DLL's and Libs that are installed with opencv are good only to a specific machine.
Another thing. Try to do the following if you use Visual Studio
go to Project Properties->Click the C/C++ folder->Code Generation->Runtime Library and change it to /MDd in Debug configuration and /MD in release
It solves a problem with esceptions related to STL
Some of the functions ave moved out to new libs (especially some of the stereo functions are in calib3d) and the header file structure is completely changed in 2.2
There are some guides to the configuration eg for visual studio

Resources