OpenCV 3.0 VideoCapture doesn't open video file in Java - opencv3.0

OpenCV 3.0 with Java cannot open video file, but it woks with camera. Before I was using OpenCV 3.0-beta it was working well in both, but in OpenCV 3.0 which is released on 2015-04-24 doesn't work with video file.
If anyone know about this problem of OpenCV 3, please tell me the reason and how to solve this.

I solved my problem like this: Copy the C:\opencv\build\x64\vc12\bin to the system path and restart the Eclipse.
Hope this help someone that may has this problem with OpenCV 3.0.

Even after adding C:\opencv\build\x64\vc12\bin to SYSTEM path, if you cannot open VideoCapture then you could also try coping opencv_ffmpegXXX_64.dll from opencv/build/java/x64 or from opencv\build\x64\vc14\bin. I don't know why this works but it worked for me after trying:
https://stackoverflow.com/a/29920295/677185 and https://github.com/opencv/opencv/issues/4974

Generally opencv_ffmpegXXX.dll file not placed at opencvjavaXXX.dll file folder so you need to load two library in java code
You should have try this.
System.loadLibrary(Core.NATIVE_LIBRARY_NAME); // for OpencvjavaXXX.dll
System.loadLibrary("opencv_ffmpeg320_64"); // for OpenCV_ffmpegXXX.dll file
You can specify full DLL file path into the (string) parameter

Related

Adding libpng to xcode

I want to add the library libpng to Xcode to read and write a .png file,
but even if I tried many recommended ways I could not do it.
Actually I have to read an image and manipulate its RGB values for my college project in C and I don't know the process of adding libraries to my IDE.
If you have any idea please help me, and maybe suggesty me if there is another useful PNG library.
Include it via a pod. It has a pod-spec: https://github.com/CocoaPods/Specs/blob/master/Specs/3/7/8/libpng/1.6.18/libpng.podspec.json
Check this out if you don't know pod's: https://guides.cocoapods.org/using/using-cocoapods

CMake path for Oculus SDK

it might very well be that this question is ill-posed.
What I try to do is compile a code from GitHub here https://github.com/stereolabs/zed-oculus
to get the ZED stereo camera video displayed inside the Oculus.
I am working with Visual Studio for this project and unfortunately I am a total newbie with CMake. I came across several tutorials how to work with CMake and while I understand how to add include directories for a VS solution (without using CMake) I completely do not understand what these 2 beginning parts of CMake-code are trying to do:
SET(OCULUS_PATH "OCULUS_SDK_ROOT_DIR-NOTFOUND" REQUIRED CACHE STRING "Path of OVR SDK folder. eg: C:\\ovr_sdk_win_0.17.0\\OculusSDK")
SET(SDL_PATH "SDL2_ROOT_DIR-NOTFOUND" REQUIRED CACHE STRING "Path of SDL2 folder. eg: C:\\SDL2-2.0.
I don't know even the correct syntax to use for the folders. On my system I have the Oculus SDK under C:\OculusSDK and the SDL under C:\SDL. Unfortunately all the examples I've found on StackOverflow so far look completely different or are using Linux based folder script.
So could please someone explain to me what the above rows of code are trying to accomplish and what code should I use given the names of my directories?
Thanks a lot!

How can I create the lbpcascade_frontalface.xml about OpenCV in Android Studio 2.0

I use the OpenCV Example named "openCVSamplefacedetection".
There is a xml file "lbpcascade_frontalface.xml"
How can I create this file by myself ?
thanks a lot
I found
\opencv\build\x64\vc12\bin\
opencv_createsamples.exe
opencv_traincascade.exe
but is there the shared, stronger, face frontal LBP file to download ?
thanks a lot.

Setting up OpenCV 2.4.2 on MS Visual Express 2010

I'm trying to set up OpenCV2.4.2 in VS2010 but not succeeding. I downloaded the OpenCV file on sourceforge.net to the directory C:\Opencv, and lib folder is missing as expected.
When trying to build/generate library files using the guide from the OpenCV wiki, the SVN repository generator fails to download, although I'm connected to the internet wirelessly.
I have tried to set up OpenCV2.1 on VS2008 and that worked without major problems.
Is there an easier way to get the required library files, etc., without much sweat?
It feels a bit awkward to answer your own question, but let me do it. I followed this link < http://www.youtube.com/watch?v=kZvjTTK9zTw > to install OpenCV 2.3.1. I thought it was not working as I could not load the image successfully.
Apparently, I made one big mistake: the image file extension. The name of the file was ending with .jpg, and I was trying to load the 'filename', changed it, then it worked fine.
Following the link above was, for me, even simpler than the opencv.org tutorial. I imagine following the same instructions as in the video would also apply for OpenCV 2.4.2.
Thx all...
Ruzzar

Setting up project in OpenCV in XCode4

I am a new OpenCV and XCode user and I have looked on the internet for a tutorial to setup a sample project in XCode 4 using OpenCV and couldnt find any. Does someone know of one?
https://www.dropbox.com/s/foipmm7q9n8aaht/How%20to%20get%20OpenCV%20working%20under%20Mac%20OS%20X%20Lion%20with%20XCode%204.1%20%C2%AB%20Salem%27s%20Log.pdf
check out the above link.It worked for me.Download the pdf.I'm seeing some weird fonts in the program from my browser.
NOTE: #include& . Don't just use this header directly.Cross check where the following header 'opencv.hpp' is stored and include it.

Resources