Git Product home page Git Product logo

Comments (16)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
I forgot the OpenCV version : 2.1.0 (official version, NOT from SVN)

For Java I use Eclipse JDT (downloaded yesterday)
To compile the OpenCV examples, there is a script "build_all.sh" that does the 
job.

Original comment by [email protected] on 14 Sep 2010 at 3:42

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Last detail (sorry, can't find how to edit the issue), I noticed that the 
Webcam light would turn on in the "64 bits" scenario, when lauching your test 
class. I think it is close to working, but I can't understand why OpenCV 
examples won't work (and why I have this error).

Note that I have no special webcam, just the one above the screen in the 
macbook.

I also didn't install any of the "optionnal" librairies :
    * libdc1394 2.1.2 (Linux and Mac OS X) http://sourceforge.net/projects/libdc1394/files/
    * PGR FlyCapture 1 or 2 (Windows only) http://www.ptgrey.com/products/pgrflycapture/
    * ARToolKitPlus 2.1.1c http://code.google.com/p/javacv/downloads/list
    * FFmpeg-Java http://code.google.com/p/javacv/downloads/list
    * which needs FFmpeg 0.6 or more recent:
          o Source code http://ffmpeg.org/download.html
          o Precompiled Windows DLLs http://ffmpeg.arrozcru.org/autobuilds/ 

Original comment by [email protected] on 14 Sep 2010 at 3:45

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
If your camera does not work with OpenCV, then it does not work with OpenCV.. 
Can you confirm it doesn't outside of JavaCV as well?

Original comment by [email protected] on 14 Sep 2010 at 5:11

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Hi,

I have a PGR Dragon fly 2, The camera is fully functional as can be demostrated 
by using flycap 1.8 and 2.0

When selecting any of the frame grabbers even the PGRFrameCapture, the 
following error is given. (this error is when PGRFrameCapture is selected)

Sep 14, 2010 8:44:45 PM name.audet.samuel.procamcalib.CalibrationWorker 
doInBackground
SEVERE: Could not perform calibration
java.lang.UnsatisfiedLinkError: Unable to load library 'FlyCapture2': The 
specified module could not be found.

        at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:164)
        at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:237)
        at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:200)
        at name.audet.samuel.javacv.jna.Loader.load(Loader.java:44)
        at name.audet.samuel.javacv.jna.PGRFlyCapture.<clinit>(PGRFlyCapture.java:83)
        at name.audet.samuel.javacv.FlyCaptureFrameGrabber.tryLoad(FlyCaptureFrameGrabber.java:78)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at name.audet.samuel.javacv.FrameGrabber.init(FrameGrabber.java:47)
        at name.audet.samuel.procamcalib.MainFrame.main(MainFrame.java:1271)

Is seems that there is a unexplained link error when getting the library. I 
also add the specific path that point directly to the files in the folder. The 
files are there but it still gives the error. Do you know of any possible 
causes or possible solutions. 

Kind Regards,
A.

Original comment by [email protected] on 14 Sep 2010 at 6:49

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Ps. I have all 32-bit software now.

Original comment by [email protected] on 14 Sep 2010 at 6:49

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
@samuel : No no no I wrote : "compiling the c examples works, and they work 
properly"
So OpenCV works with my webcam, wich is the one included in my macbook BTW.

So no problem on this side I guess.

Original comment by [email protected] on 14 Sep 2010 at 8:03

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Have you tried to recompile without SSE instructions? In both 32-bit and 
64-bit? Some have also reported that their cameras worked in the "client" 
version of the JVM, but not the "server" one.. In any case, it's either the SSE 
problem, or it's something that Java does that your hardware does not like, and 
hardware may like better the "client" one..  But it's not a problem with JavaCV 
itself.. 

Original comment by [email protected] on 15 Sep 2010 at 2:29

  • Changed state: Invalid

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
And andre, it looks like you are trying to load 32-bit FlyCapture inside 64-bit 
Java or vice versa. Get everything in either 32-bit or everything in either 
64-bit. You cannot mix both

Original comment by [email protected] on 15 Sep 2010 at 2:32

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Yes I compile OpenCV without SSE instructions in all cases.
Ok so maybe it is related this the "client/server" version problem. Do you know 
how I can know wich version I have ?

But why would the OpenCV example work then...

Original comment by [email protected] on 15 Sep 2010 at 2:58

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Then do not compile with SSE instructions.

http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#compiler_types

Because the compiler that they used to compile Java is not the same compiler 
that you used to compile OpenCV

Original comment by [email protected] on 15 Sep 2010 at 3:10

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
"Then do not compile with SSE instructions." > you mean OpenCV, Java or my 
program ?

Original comment by [email protected] on 15 Sep 2010 at 3:15

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Thank you again... I just reinstalled everything and now it works, kind of.

The entire calibration runs and then when it is completed the following error 
occurs.

SEVERE: Could not perform calibration
java.lang.Exception: flycaptureConvertImage() Error 2
at 
name.samual.javacv.FlyCaptureFrameGrabber.grab(FlyCaptureFrameGrabber.java:411)

Kind regards,
A.

Original comment by [email protected] on 15 Sep 2010 at 5:35

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Matthieu, I don't know what works or not on a Mac, I don't use one

Original comment by [email protected] on 16 Sep 2010 at 12:57

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
BTW, please post on the mailing list to see if anyone figured out how to make 
camera capture work under Java for Mac OS X.. There might be other people using 
Java to capture from a camera on a Mac, but I am not one of them, and no one 
else other than you and me receives messages posted here 

Original comment by [email protected] on 25 Sep 2010 at 3:28

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Hi, I have a similar problem on Mac Os X version 10.5.8.

I programmed under Eclipse the following simple example as given in the project 
description page:

import static name.audet.samuel.javacv.jna.cxcore.*;
import static name.audet.samuel.javacv.jna.cv.*;
import static name.audet.samuel.javacv.jna.highgui.*;
import static name.audet.samuel.javacv.jna.cvaux.*;

public class Test {
    public static void main(String[] args) {
        IplImage image = cvLoadImage("test.png", 1);
        if (image == null) {
            System.err.println("Could not load image file.");
        } else {
            cvSmooth(image, image, CV_GAUSSIAN, 3, 0, 0, 0);
            // ...
        }
    }
}

I compiles fine, but when I try to run it, I get the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load 
library 'cxcore': dlopen(/usr/local/lib/libcxcore.dylib, 9): no suitable image 
found.  Did find:
    /usr/local/lib/libcxcore.dylib: mach-o, but wrong architecture
    /usr/local/lib/libcxcore.dylib: mach-o, but wrong architecture
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:163)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:236)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:199)
    at name.audet.samuel.javacv.jna.Loader.load(Loader.java:44)
    at name.audet.samuel.javacv.jna.cxcore.<clinit>(cxcore.java:115)
    at name.audet.samuel.javacv.jna.highgui.<clinit>(highgui.java:73)
    at Test.main(Test.java:8)

To install OpenCV, I did as stated in the documentation:

   1. tar -xjf OpenCV-2.1.0.tar.bz2
   2. mkdir opencv.build
   3. cd opencv.build
   4. cmake [<extra_options>] ../OpenCV-2.1.0 # CMake-way
   5. make -j 2
   6. sudo make install

Everything seems to work fine during all these steps.

Maybe I need an extra option for the cmake. I tried:

cmake -D CMAKE_OSX_ARCHITECTURES=i386 -D CXX_FLAGS=-m32 -D CMAKE_C=-m32 
../OpenCV-2.1.0

But it does not seem to change anything to the way the library is compiled.

Any help would be greatly appreciated.

Thanks,
/Renaud

Original comment by [email protected] on 26 Oct 2010 at 11:42

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
I do not use Mac OS X, but my guess is you are trying to use a 32-bit compiled 
version of OpenCV with a 64-bit JVM, or vice versa. Everything has to be either 
32 bits *or* 64 bits, you CANNOT mix them.

Anyway, you should post your question in the discussion group. In theory, I am 
the only one reading what you write here.

Original comment by [email protected] on 27 Oct 2010 at 7:04

from javacv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.