Can one use OpenCV with Processing and Openframeworks? - opencv

I'm working with C++ (Code::Blocks + OpenframeWorks) and Processing on different projects and have only found the Processing libraries that use the VC++ pre-compiled OpenCV bundle... As I need to use OpenCV with Code::Blocks rather than Visual Studio I was wondering if it is possible to do both?
Side question: I am having trouble compiling OpenCV with Code::Blocks and CMake does anyone have any experience or can point me to a tutorial for the CB 10 + OpenCV 2.3.1 combo?
Thanks in advance.
Best,
Tamler

The official Code::Blocks / OpenCV tutorial can be found here. Have you tried it?
There's also the Compile OpenCV under MinGW tutorial, and you might want to check it out.

Related

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

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!

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.

What is the deference between OpenCV2.4.10 and JavaCV 0.10

I want to know if I download the OpenCV2.4.10, is there the need of JavaCV 0.10 or not, because in the extracted folder of OpenCV2.4.10 inside \OpenCV\build\java there is a Jar file named opencv-2410.jar. I am using Java Language to use OpenCV library. But I also saw JavaCV which can be found at http://bytedeco.org website, when I downloaded all Jars, here I also found named opencv.jar file. Now I don't know what is the deference between them, in Java Language which one is better to use. If use OpenCV2.4.10 is need to JavaCV 0.10? and if use JavaCV 0.10 is need to OpenCV2.4.10? or both of them can be independent used? the If anyone know about this please tell me, Thanks in advance!!
OpenCV library is written in C/C++. Java wrappers are written so that, C/C++ code could be invoked with JNI. JavaCV( unofficial ) and OpenCV( official ) are completely independent java wrappers to use OpenCV from Java.
I suggest you use OpenCV downloaded from offical opencv.org website or from OpenCV github repo(1). Here java wrappers are auto generated during build and so all C/C++ OpenCV functions will have corresponding Java wrappers. This way, every new release or even development versions of OpenCV could be used from Java. This also helps with reading documentation as function parameters matches nearly.
JavaCV is a popular Java wrapper for OpenCV maintained by independent developer(s). It also add helper classes for easier usage. But here, wrappers are not auto generated and so you will need to wait for developers to update to newer versions.

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.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