javacv

Getting JavaCV 0.9 platform binaries to download automatically with SBT

梦想与她 提交于 2019-12-11 20:48:06
问题 I have an SBT application that is using JavaCV on Windows. My build.sbt brings in JavaCV and its dependencies using: classpathTypes += "maven-plugin" libraryDependencies += "org.bytedeco" % "javacv" % "0.9" This pulls JavaCV and its dependents (JavaCPP), but it isn't pulling the JAR with the platform specific libraries (opencv-windows-x86_64.jar). This allows me to build, but I get "UnsatisfiedLinkError: no jniopencv_core in java.library.path" Based on http://www.warski.org/blog/2014/01/using

ExceptionInInitializerError in Stitcher with JavaCV for Android

僤鯓⒐⒋嵵緔 提交于 2019-12-11 20:31:35
问题 I am using this code for image stitching with JavaCV on Android: public void ImageStitching() { Stitcher stitcher = Stitcher.createDefault(false); MatVector images = new MatVector(2); images.put(0,cvLoadImage("sample1.png")); images.put(1,cvLoadImage("sample2.png")); IplImage result = new IplImage(null); int status = stitcher.stitch(images,result); if( status == Stitcher.OK ) { cvSaveImage("result.png", result); } } But when I execute it, the app crashes and the log shows the following error:

How to draw Buffer[] to a TextureView on Android?

纵然是瞬间 提交于 2019-12-11 12:18:06
问题 I'm using JavaCV's FFmpegFrameGrabber to retrieve frames from a video file. This FFmpegFrameGrabber return a Frame which basically contain a Buffer[] to hold image pixels for a video frame. Because performance is my top priority, I would like to use OpenGL ES to display this Buffer[] directly without converting it into Bitmap . The view to be displayed is only taking less than half of the screen and following the OpenGL ES document: Developers who want to incorporate OpenGL ES graphics in a

JavaCV Error in Android

 ̄綄美尐妖づ 提交于 2019-12-11 12:10:02
问题 It may be a previously asked related issue regarding JavaCV on Android.My main objective is to apply grayscale/other image effect on video. File sourceFile = new File(Environment.getExternalStorageDirectory() + File.separator + "test.mp4"); FFmpegFrameGrabber ffg = new FFmpegFrameGrabber(sourceFile); OpenCVFrameConverter.ToIplImage converter = new OpenCVFrameConverter.ToIplImage(); try { ffg.start(); int count = 0; while (true) { Log.d("JAVA_CV", "Counting . . . " + count); Frame original

fatal error has been detected by the Java Runtime Environment: OpenCV ellipse detection in Java

橙三吉。 提交于 2019-12-11 08:22:58
问题 We tried to convert the c++ Code from Detection of coins (and fit ellipses) on an image into Java. After solving the first problem in the thread Problems with OpenCV ellipse detection in Java, starting the program with the parameters 2 PathToThePicture leads to following fatal error # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000005addc330, pid=1700, tid=1472 # # JRE version: Java(TM) SE Runtime Environment (7.0

Adding transparency to a video from black and white (and gray) alpha information video images

坚强是说给别人听的谎言 提交于 2019-12-11 07:27:44
问题 I'd like to create a video with transparency (and semi transparency) in android. The images of the source video are split into two images, the top one with color information (looks like the normal video image), the bottom one with alpha information (the same shapes but only in black and white and gray, black means transparent). This is the solution for iOS: https://medium.com/@quentinfasquel/ios-transparent-video-with-coreimage-52cfb2544d54 What would be the best way to to this in android?

Problems with OpenCV ellipse detection in Java

こ雲淡風輕ζ 提交于 2019-12-11 03:29:01
问题 We tried to convert the c++ Code from Detection of coins (and fit ellipses) on an image into Java. When we start the program with the parameters 2 PathToThePicture it crashes with this error: OpenCV Error: Bad argument (Array should be CvMat or IplImage) in cvGetSize, file ..\..\..\..\opencv\modules\core\src\array.cpp, line 1238 Exception in thread "main" java.lang.RuntimeException: ..\..\..\..\opencv\modules \core\src\array.cpp:1238: error: (-5) Array should be CvMat or IplImage in function

JavaCv: how to convert IplImage toBufferedImage

余生长醉 提交于 2019-12-11 03:23:21
问题 I have to convert an IplImage to a BufferedImage... what should be a simple task is becoming very intricate for me. I'm using JavaCv 1.0 on Mac OSX (which links with OpenCV 3.0). In the old JavaCV API there was the IplImage method #getBufferedImage, but I can't find it anymore in new 1.0 API. So I tried to convert IplImage to byte array and byte array to BufferedImage. I found this solution to perform such conversion: IplImage inputImg = cvLoadImage(imgName); //imgName is a JPEG absolute path

cvCreateFileCapture() Error: Could not create camera capture with JavaCV

社会主义新天地 提交于 2019-12-11 03:03:43
问题 At this moment I worked on recognition forms. It's perfect with camera of my computer, but now I would like test with a camera on network. I use JavaCV (OpenCV apply to Java). This is my code: public static void main(String[] args) throws Exception { OpenCVFrameGrabber grabber = new OpenCVFrameGrabber("http://192.168.1.210:5500/snapshot.cgi?user=admin&pwd=123456"); grabber.setFormat("mjpeg"); grabber.start(); for (int k=0; k<20000; k++){ System.out.print(k); } IplImage frame = grabber.grab();

How to use the FaceRecognizer library created in openCV from Java?

て烟熏妆下的殇ゞ 提交于 2019-12-11 01:43:14
问题 I am trying to implement a face recognizer in java. I got this code example and made changes to fit my requirements on how the system should behave. It works but then when I have images of the same person in different light intensities its efficiency drops. I read that there is a library inserted in openCV for faceRecognizer but then its samples are implemented in c++. Is there any way i can use this library to code in java? and also if we can use it then will it increase the efficiency of