Questions tagged [javacv]

JavaCV provides wrappers to commonly used computer vision libraries, OpenCV in particular. Note that JavaCV is now superseded by an official OpenCV Java API. Do not use this tag for the official OpenCV Java API, use [opencv] + [java] instead.

0
votes
0answers
6 views

How to pass grayscale image (opencv mat) to LBPHFaceRecognizer JavaCv function and retrieve histogram data for each image?

I want to extract uniform lbp feature and histogram using both OpenCV and JavaCV in android. I'm new to image processing. I am trying to develop a face recognition app in android using both OpenCV ...
1
vote
0answers
14 views

Javacv Face Recognition in Android: dlopen failed: library libopencv_legacy.so not found

I am trying face recognition in Android using JavaCV (google-code). It is showing this error: java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libopencv_legacy.so" not found ...
0
votes
0answers
25 views

Record video with webcam and save it in java

My goal is to capture a video with a webcam and save it. I am already able to take photos with the webcam. Therefore, I use the webcam API provided by sarxos. I now want to stick together images to ...
0
votes
0answers
14 views

difference between JavaCV 1.5 and 1.4.4 on Indexer using in object detection with Yolo

My environment: Ubuntu 18.04 LTS 64bit Java: OpenJDK8 + Groovy 2.5.6 JavaCV version: 1.4.4 vs 1.5 Yolo version: Yolo v3 tiny I use open_dnn in JavaCV for detecting objects with Yolo. My code runs ...
0
votes
0answers
28 views

How to generate a opencv mat from row x col mats in parallel?

I want to compose a JavaCV's Mat from decoding a list of byte[] and compositing by rows and cols, like the code below: int index = 0; MatVector colVector = new MatVector(); OpenCVFrameConverter....
0
votes
1answer
31 views

Why is Bufferedimage equaling null after a few iterations?

After a few iterations through my for loop, the Bufferedimage variable just receives a null. The first 2-3 times are usually fine. I tried different mp4 files to see if it was just the videos having ...
1
vote
1answer
208 views

How to Read DJI H264 FPV Feed as OpenCV Mat Object?

TDLR: All DJI developers would benefit from decoding raw H264 video stream byte arrays to a format compatible with OpenCV. I've spent a lot of time looking for a solution to reading DJI's FPV feed ...
0
votes
0answers
14 views

Error in webcam and audio capture with javacv?

I referred to this code in this link: https://github.com/bytedeco/javacv/blob/master/samples/WebcamAndMicrophoneCapture.java I have error with this code. Output: --- exec-maven-plugin:1.2.1:exec (...
0
votes
0answers
21 views

How to programmatically read an audio RTP stream using javacv and ffmpeg?

I am trying to read an audio RTP stream coming from ffmpeg in command line using javaCV. I create a DatagramSocket that listens to a specified port but can't get the audio frames. I have tried with ...
2
votes
0answers
45 views

Error in running javacv 1.5 in Android app

I trying to open an ONVIF WIFI CAMERA with FFmpegFrameGrabber for use in javacv in Android studio . I send frameGrabber.grabImage() to AsyncTask in render method of SurfaceView: ''' ...
0
votes
0answers
18 views

How to fix cvCreateFileCapture() Error: Could not create camera capture

I got a code from a youtube tutorial about connecting a IP camera to a laptop through Java, but when I run the program, I get the following error: Exception in thread "main" com.googlecode.javacv....
0
votes
0answers
15 views

Getting exception in javacv Loader.load() when preparing video using screenshot's in java shutdown hook. Working fine if used normally

I am using javacv library to build video using screenshot's but getting an exception when doing this using java shut down hook thread. The exception is noclassdeffounderror. Exception in thread "...
0
votes
0answers
23 views

Video streams are saved to local and sent to the Internet by rtmp using Javacv ffmpeg

Hello,I want to record camera streaming to save sdcard and bying RTMP to send server using the javaCV at the android. I can use FFmpegFrameRecorder method: recorder = new FFmpegFrameRecorder(...
0
votes
0answers
100 views

Android javacv FFMpeg overlay animated gif over video

I'm developing an Android app that creates a video (from an image plus an mp3 file) with javacv and FFMpeg and the video generation part is working fine, but my problem comes now that I would like to ...
0
votes
1answer
46 views

JavaCV Fetch RTSP Meet “avcodec_open2() error -40: Could not open audio codec” Error

I am trying to use javacv to fetch a rtsp monitoring camera and grabber the frames, but meet "avcodec_open2() error -40: Could not open audio codec" error when the grabber is prepare to start after ...
0
votes
0answers
22 views

Can't find package where “cvLoad” is located in JavaCV?

I try a sample code for face detection but the method cvLoad is not found, even if I imported org.bytedeco.javacpp.opencv_objdetect.* : import org.bytedeco.javacpp.FlyCapture2.Image; import org....
0
votes
0answers
18 views

Create HLS TS file in memory with JavaCV

I have a mp4 video file. Is it possible to read HLS ts segment from video file using JavaCV (FFmpegFrameGrabber) and save it in memory? I want to filter those ts segments dynamicaly. Zlaja
0
votes
1answer
35 views

JavaCV - Improve Webcam Quality

im currently trying to implement a webcam scanner. My current problem is that i can't capture a high quality image when using Java. The camera i use has 8MP and produces great images when i use the ...
0
votes
0answers
48 views

Getting video Rotation metadata value using JavaCV

It seems there are lots of related topics out there, but I was not able to find the answer I'm searching for. I'm using JavaCV and FFmpegFrameGrabber to get an image from the middle of the video. If ...
0
votes
0answers
20 views

The method cvSmooth in the type opencv_imgproc is not applicable for the arguments

I am using the below code to do a simple median blur of an image for color threshold purposes. However I have the above error. I am a beginner in JavaCV and I believe upon reading the API I have the ...
0
votes
0answers
36 views

Passing FFMpeg Options into FrameGrabber Has No Effect At All

I'm using FFMpegFrameGrabber on android to consume an rtmp live stream, that streams at 30fps, i tried to set the grabber frame rate using setFrameRate(4) and setOption("framerate","4"), in order to ...
0
votes
0answers
45 views

JavaCV grab frame method delays and returns old frames

I'm trying to create a video player in Java using JavaCV and its FFmpegFrameGrabber class. Simply, Inside a loop, I use .grab() to get a frame and then paint it on a panel Problem is, player gets ...
0
votes
0answers
73 views

How to set a timeout for FFmpegFrameGrabber grab() method in JavaCV

I'm trying to create a player in Java using JavaCV. But .grab() method takes different amounts of time for each grab. How can I discard a grab() operation when it takes too much time? In detail: I'm ...
0
votes
0answers
89 views

Cropping of Aligned face image in OpenCV

How do the cropping of Image is done after face alignment. The reason Im asking this question is that, the landmarks are used to Align the image and after the alignment is done the old landmarks are ...
0
votes
1answer
62 views

opencv face recognition false positives unknown category

I have trained FisherFaces algorithm with about 50 images for two individuals. It does recognize them accurately, but it also recognizes others as them. I've tried to use the threshold value as an ...
0
votes
0answers
12 views

Download only OS specific *.jars

When I integrate javacv as Maven dependency all javacv libraries are downloaded. Is it possible to download only OS (e.g. Linux) dependent *.jars?
0
votes
1answer
125 views

How can I recieve an RTP stream with JavaCV?

I'm trying to stream video from an RTP server (currently VLC for testing) and decode it in Java. To do this, I'm using JavaCV to decode the incoming stream. Here's what I have so far: try { ...
0
votes
1answer
231 views

openCv 4 Java HighGui.imshow

In the python way, loading and displaying images is quite straightforward. import cv2 image = cv2.imread("path/to/image") cv2.imshow("test window", image) cv2.waitKey(0) # any key press will close ...
0
votes
1answer
169 views

Difference between opencv_core.Mat vs opencv.core.Mat and how to convert to each other?

What is the difference between the two? org.bytedeco.javacpp.opencv_core.Mat org.opencv.core.Mat And how can they be converted to each other? I thought javacpp is a wrapper around opencv and ...
1
vote
0answers
24 views

Viewing the matched features in OpenCV stitching pipeline

I am facing trouble with a 2D stitching problem as posted here: link I want to see the feature matching that happens in the stitching pipeline. I can do it by writing the stitching algorithm on my ...
0
votes
0answers
52 views

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

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. ...
0
votes
0answers
55 views

Java : can't find javacv pointer class

I have installed the Javacv jar file here : http://www.java2s.com/Code/Jar/j/Downloadjavacvjar.htm After extracting the zip file I put the .jar file in the ext folder located inside the jre folder. ...
1
vote
0answers
41 views

Improving accurary of face recognition with Javacv

I'm new in javacv. I'm trying to create a system for face recognition and faced to a problem of low accurary of recognition. I use EigenFaceRecognizer for identification and Georgia Tech Face Database ...
1
vote
0answers
28 views

Trying to detect faces in mp4 (javacv + opencv) leads to fatal errors SIGSERV

My best guess: Am I not releasing frames somehow? I read a video using org.bytedeco.javacv.FFmpegFrameGrabber, and convert the frames to opencv_core.Mat, then convert THOSE to opencv.core.Mat (...
0
votes
1answer
34 views

Background filtering on images

I am new to image processing. I am trying to find dominant colors in an object and avoid the background color (white, gray or black). I am using java, and a library (wrapper over opencv), any other ...
0
votes
1answer
54 views

FFmpegFrameGrabber faster SetTimestamp using only Keyframes

i'm using javacv to read mp4 files and the following code to seek the video: FFmpegFrameGrabber frameGrabber; [...] frameGrabber.setTimestamp(timestamp); The problem is that it takes several seconds ...
0
votes
0answers
123 views

Face Recognization in video JavaCV

I am just learning JavaCV and found a sample code for face recolonization. Here is the code import java.io.File; import org.bytedeco.javacpp.IntPointer; import org.bytedeco.javacpp.DoublePointer; ...
1
vote
1answer
91 views

Getting a build error on android studio while using java cv

I am not able to get a successful gradle build in android studio which uses Java CV. The error looks like this: Caused by: com.android.builder.merge.DuplicateRelativeFileException: More than one file ...
1
vote
0answers
63 views

Android Facial recognition using OpenCV in Android

I am trying to develop facial recognition using opencv in android I have successfully integrated opencv with JavaCv and Javacpp I trained data images from sdcard and then recognize with same image but ...
1
vote
1answer
101 views

Remove black border/boxes around text for better OCR?

The borders across the text like in the following image is giving a very bad result for OCR. So I am using javaCV(java wrapper for OpenCV ) to remove borders and boxes around text in an image. The ...
0
votes
1answer
338 views

FaceRecognition with JavaCV

I am learning OpenCV and JavaCV to do some face recognition project with Java. I have just found below example code on github : https://github.com/bytedeco/javacv/blob/master/samples/...
0
votes
0answers
34 views

place audio on video using javacv android

i create video through sequence of images. 5 images video length 10 seconds and audio file length is 4 mints. when i merge audio on video. video length is 4 mints. i want to length to only 10 sec. if ...
0
votes
1answer
204 views

java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes (1100M) > maxPhysicalBytes (1024M)

When I record video using FFmpegFrameRecorder it shows me this error E/AndroidRuntime: FATAL EXCEPTION: Thread-36 java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes ...
0
votes
1answer
167 views

Stream h264 to javafx possibly using javacv/ffmpeg

I'm really stuck on getting a video stream to play on a java fx project. -- Short version: I'm streaming h264/avcc flavor video from an android phone to a desktop computer. However javafx doesn't ...
0
votes
0answers
22 views

Building Java code all the custom classes in the same Dir [duplicate]

I am trying to build a java program from source code, https://github.com/gavazquez/CLineTester/tree/master/Java All the classes are in the same dir. When I build the main file the compiler fails to ...
0
votes
1answer
361 views

(-215:Assertion failed) 1 <= blobs.size() && blobs.size() <= 2

I'm trying to import my own pre-trained Caffe Googlenet model using OpenCV v.3.4.3, where i run a Caffe test after training using the model deploy file and everything was working fine. However when ...
0
votes
0answers
37 views

how to use 2 camera when develop with javacv

Loader.load(opencv_objdetect.class); FrameGrabber grabber = FrameGrabber.createDefault(1); the error: (1) Could not find the CLEyeMulticam.dll (2) Could not find the CLEyeMulticam.dll org....
0
votes
0answers
33 views

How to make OpenCV and JavaCV executable jar file

I have just made a face detection program with OpenCv & JavaCV. For GUI I have used Java Swing and I have used Eclipse IDE. The program is fine and running without any error. But when I make a jar ...
0
votes
0answers
263 views

OpenCV and JavaCV error : no jniopencv_core in java.library.path

I am new with OpenCV and JavaCV. I am trying to make a face detection program but when I run my code its showing below error : Exception in thread "main" java.lang.UnsatisfiedLinkError: no ...
0
votes
1answer
42 views

org.bytedeco.javacv.CanvasFrame showImage is hanging

An IOS device is uploading h264 files (3 sec videos) to a server. Each file is successfully readable by VLC. Using FFMpegFrameGrabber, I grab each frame and try to display them using CanvasFrame....