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.

JavaCV was originally a Google supported project for interfacing Java to computer vision libraries. However it is now part of Bytedeco.

JavaCV is a wrapper around OpenCV's C API, which has been deprecated in favor of a newer C++ API. There is now an official OpenCV Java API, which is an automatically generated binding for the C++ API, and this probably should be used in preference to JavaCV for new code.

987 questions
4
votes
1 answer

How to implement Face Recognition in Java using images?

How can I compare two face images, whether they belong to same person or not. Let me explain: The code will get two images as input and recognize it and compare them. If it belongs to same person (even though takes at different time) it will return…
4
votes
3 answers

Convert IplImage to Mat in javacv

I need help to convert my IplImage into Mat. I want to compute HOGDescriptor for my image and then classify it with SVM, but "compute" requires Mat type. Can you give some example of how to convert IplImage into Mat in java ?
user2389417
  • 43
  • 1
  • 3
4
votes
9 answers

JavaCV/OpenCV: cvLoadImage not working

I installed the JavaCV/OpenCV libraries, and I'm having a problem with the basic example code. According to several examples that I have looked at, this code should load an image: IplImage image = cvLoadImage("C:\\img.jpg"); But, when I run that I…
Lucas
  • 567
  • 1
  • 8
  • 21
4
votes
1 answer

Stream video using javacv to a rtsp server

I am using java CV for video streaming.And I captured video from web cam.But it fails when i tried to transfer the stream to the Darwin server. The code is, package streamingapp; import com.googlecode.javacpp.Loader; import…
Sruthy Antony
  • 41
  • 1
  • 4
4
votes
1 answer

Looping through OpenCV Mat in Java bindings

I am trying to convert a C++ method from a previous answer I received using OpenCV to Java using OpenCV Java bindings C++ code: cv::Mat gray; cv::Mat element = cv::getStructuringElement(cv::MORPH_CROSS, …
birdy
  • 9,286
  • 24
  • 107
  • 171
4
votes
3 answers

can't find dependent library javacv

I have this code: package javacv; import static com.googlecode.javacv.cpp.opencv_core.*; import static com.googlecode.javacv.cpp.opencv_imgproc.*; import static com.googlecode.javacv.cpp.opencv_highgui.*; import javax.swing.JOptionPane; /** * *…
Mahdi_Nine
  • 14,205
  • 26
  • 82
  • 117
4
votes
1 answer

Where do we get native library .so files for javacv from?

So I'm having a problem with running some javaCV code, and though I've seen numerous fixes online for it, none have worked. The exact error is java.lang.UnsatisfiedLinkError: /tmp/javacpp/libjniopencv_core.so cannot open shared object file: no…
4
votes
1 answer

JavaCv compare 2 histograms

I’m trying to compare two histograms from grayscale images. I’m using the CV_COMP_CHISQR (0.0 perfect match – 1.0 total mismatch). I normalized both histograms to 1. But when I compare the histograms I get result over 40.0 which make no sense. I…
Du_
  • 915
  • 1
  • 9
  • 16
4
votes
4 answers

How to set a mask image for grabCut in OpenCV?

How can I set a mask image for the grabCut function in OpenCV? I want to do GC_INIT_WITH_MASK with the options GC_BGD = 0, GC_FGD = 1, GC_PR_BGD = 2, GC_PR_FGD = 3, If you can answer this with JavaCV it would be great as I am doing this in…
Phil
  • 46,436
  • 33
  • 110
  • 175
4
votes
2 answers

how to merge audio file with new video file?is it possible in android?

i successfully got video from sequence of images using javacv in android.now i have problem that is how to merge audio to that newly created video.is it possible in android or javacv integration? Here is my code, String path…
rams
  • 273
  • 1
  • 5
  • 13
4
votes
1 answer

JavaCV Fails to Run after successful clean and build

I have done a project in java ie a motion detection s/w using javaCV libraries. when i debug the code from netbeans it works correctly. It detects motion and make alarms, sending mail etc. But when i clean and build the code, the obtained .jar file…
Anooj Krishnan G
  • 849
  • 7
  • 25
4
votes
3 answers

OpenCV 2.4.3 - JavaCV 0.3 - FaceRecognizer Class - LBPH - Update function still not working

I have implemented face recognition in Java using javacv LBPH class, but i face a problem in which the FaceRecognizer.LBPH does not support the update function. Here's the error: "OpenCV Error: The function/feature is not implemented (This…
4
votes
1 answer

JavaCV - Identifying the most accurate of detected faces

I am new to the JavaCV/OpenCV thing, so apologies in advance if I'm being a complete idiot... I need to detect the "primary/main" face in an image (This image will for the most part be a "Profile picture"), face recognition is not required. Due to…
NeilA
  • 1,450
  • 2
  • 12
  • 20
4
votes
1 answer

Area calculation in opencv/javacv?

Please can some one explain how to identify area which are should in red and blue colors in following image ? I tried to use cvFindContours() method but it didn't give expected result for me. Input image Expected result I Like to know whether…
LkDev
  • 221
  • 3
  • 9
4
votes
1 answer

How to identify contour which are not directly separated from each other?

Please can some one explain how to identify square shape of contours which are not exactly separated each other. For example I need to identify the number of squares in below image and the x,y coordinates of their edges. I try to go through this…
NadLnk
  • 279
  • 2
  • 9