javacv

Recording video on Android using JavaCV (Updated 2014 02 17)

烈酒焚心 提交于 2019-12-03 03:29:00
I'm trying to record a video in Android using the JavaCV lib. I need to record the video in 640x360. I have installed everything as described in README.txt file and I followed the example as below: https://code.google.com/p/javacv/source/browse/samples/RecordActivity.java In this example, the video size is this: private int imageWidth = 320; private int imageHeight = 240; In my case, I need to record a video in 640x360 H.264. (UPDATE) I have reverted my code and kept exactly like in the example, just changing imageWidth and imageHeight to 640x360. Now I'm getting the video like this image:

What are the parameters passed to cvFindContours() in JavaCV?

纵然是瞬间 提交于 2019-12-03 03:19:09
Please can some one explain about cvFindContours method and what are the parameters that it required? For example, here's code using OpenCV: hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) Please can some one explain how to write this using JavaCV? As comments mentioned by Mohammad those three parameters are header_size , mode and method . You can use this method as follows IplImage src = cvLoadImage(path);//hear path is actual path to image IplImage grayImage = IplImage.create(src.width(), src.height(), IPL_DEPTH_8U, 1); cvCvtColor(src, grayImage, CV_RGB2GRAY);

IplImage inside IplImage

本小妞迷上赌 提交于 2019-12-02 20:54:26
问题 Is it possible to place an image inside an image with OpenCv (JavaCv). For example i have a 1000x1000 image and a 100x100 image. And at position 600x600 i would like to place the smaller image inside the larger image. lets say the blue box is the 1000x1000 IplImage and the red one is the 100x100 IplImage. Is it possible to put the red box in the blue box. Preferably computational rather efficient because it has to work in real time. Thx in advance 回答1: This is in Python, but conversion to

Learning JavaCV in pure Java [closed]

孤者浪人 提交于 2019-12-02 18:58:57
I am trying to learn JavaCV. As you all know, the lack of educational materials on this subject is a very big problem. In JavCV home page, they have provided lot of examples for the C++ examples in book "OpenCV CookBook". But the case is, they are not Java, they are in SCALA!!!! Now I have already gone crazy! I know lot of examples are in web, but I want to learn it from beginning to advance, then only I can do it properly. "OpenCV CookBook" is a very good book but it is all about OpenCV in C++, not anything about Java. Someone please help me to find a better place to learn JavaCV. Provide me

Trying to make java application (Executable Jar) that uses OpenCV portable. Getting unsatisfied link error

故事扮演 提交于 2019-12-02 16:57:36
问题 I have made a application to grab video from a webcam and detect motion using OpenCV and JavaCV. I am trying to export as an executable jar using eclipse. The program runs fine in eclipse as does the exe jar on the computer I coded the program on. What I am trying to accomplish is to make the exe Jar run on computers that don't have OpenCV installed. Basically what I would consider a portable application. When I run the exe jar on a different computer that has nothing installed other than the

How to stitch 100s of images using OpenCV/JavaCV? Most of the current solutions leads to artifacts

南笙酒味 提交于 2019-12-02 12:53:15
I am trying to stitch a large number of images which have good amount overlap like these: ExampleImage1 and ExampleImage2 . Firstly, i want a 1D line of a grass patch. Something like this: Result . This is a screenshot of the original result, the original picture is more than 2MB. Hence couldnt upload it. This was achieved by breaking down 300 images into small sets and stitching them. Like this example but in a larger scale with more heirarchies - 0.jpg,1.jpg,2.jpg images in stitch1.jpg, 2,3,4 in stitch2.jpg and later stitching stitch1.jpg and stitch2.jpg together Now i want to get the same

Trying to make java application (Executable Jar) that uses OpenCV portable. Getting unsatisfied link error

人盡茶涼 提交于 2019-12-02 12:52:42
I have made a application to grab video from a webcam and detect motion using OpenCV and JavaCV. I am trying to export as an executable jar using eclipse. The program runs fine in eclipse as does the exe jar on the computer I coded the program on. What I am trying to accomplish is to make the exe Jar run on computers that don't have OpenCV installed. Basically what I would consider a portable application. When I run the exe jar on a different computer that has nothing installed other than the JRE I get unsatisfied link errors seen below. Exception in thread "Video Thread" java.lang

javaCV UnsatisfiedLinkError

ε祈祈猫儿з 提交于 2019-12-02 11:21:14
问题 I have a problem with JavaCV. I downloaded javaCV-bin and i added .jar file in my project in references libraries on ubuntu I could worked sample codes which locate in downloaded file But error is Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libjniopencv_core3835922554849797701.so: libopencv_core.so.2.4: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java

nu.pattern.OpenCV$UnsupportedPlatformException: Operating system “WINDOWS” and architecture “X86_64” are not supported

泄露秘密 提交于 2019-12-02 09:50:41
I am trying to load opencv using the above method in a spring mvc project that has the following maven dependency:- <dependency> <groupId>org.openpnp</groupId> <artifactId>opencv</artifactId> <version>3.2.0-0</version> </dependency> My code is: static { nu.pattern.OpenCV.loadShared(); System.loadLibrary(org.opencv.core.Core.NATIVE_LIBRARY_NAME); } Any help in solving this error will be appreciated. Thanks in advance Solved this one.. Based on a stack post I included the following lines of code to load the library.. static{ String osName = System.getProperty("os.name"); String opencvpath =

Installed latest JDK 1.8.0, but my Javac -version still shows an older version (Windows 7 - 64)

≯℡__Kan透↙ 提交于 2019-12-02 08:42:20
I've been attempting to install NativeScript with Angular with this tutorial for the past two days, and I keep running into problems surrounding the Android SDK not installing correctly and freezing, and finally re-installing the latest JDK and JVE before attempting to install Android Studio. As I researched the problem I think I found the culprit: When I run Javac -version I keep getting an older version of JDK, it states: javac 1.6.0_45 However I have the latest version of Jdk 1.8.0_102. I researched the problem, but only found either complex solutions invilving the variable path, or MAC