Git Product home page Git Product logo

Comments (11)

vonnieda avatar vonnieda commented on July 4, 2024

@salamanders Are you using Java 10? See #33

from opencv.

salamanders avatar salamanders commented on July 4, 2024

I didn't think I was - even though I have 10 on my system, I thought it was all executing with 1.8.
Removing 10 to be sure...
println(System.getProperty("java.version")) does return "1.8.0_181"

from opencv.

vonnieda avatar vonnieda commented on July 4, 2024

@salamanders Oh, in that case it's the ffmpeg error in #38. My recommendation for now is to use the v2.4.11-2 version of the package, or alternately install ffmpeg on your system with something like brew install ffmpeg.

from opencv.

salamanders avatar salamanders commented on July 4, 2024

I have, but I can try the older version. (I was hoping to use 3.x)

ffmpeg -version
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.2)
configuration: --prefix=/Users/benhill/brew/homebrew/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-librtmp --enable-libssh --enable-libvidstab --enable-libwebp --enable-opencl --enable-openssl --enable-videotoolbox --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/Users/benhill/brew/homebrew/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree

Edit: no luck: <version>2.4.11-2</version> == Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java343 in java.library.path

from opencv.

salamanders avatar salamanders commented on July 4, 2024

Two things of note:

  1. My brew is under my user (so I don't have to run it as root) Warning: Your Homebrew's prefix is not /usr/local.
  2. This is Kotlin. (which shouldn't matter, it is running java under the hood)

from opencv.

salamanders avatar salamanders commented on July 4, 2024

Any thoughts? Did 3.4.3 break something? My code is in https://github.com/salamanders/facesnap/tree/master if anyone wants to try.

from opencv.

vonnieda avatar vonnieda commented on July 4, 2024

Oh, it looks like you are referring to the wrong project. In your pom you are referring to JavaCV. This project is OpenPnP OpenCV. The two are not related, and are not compatible. See https://github.com/bytedeco/javacv

from opencv.

salamanders avatar salamanders commented on July 4, 2024

Sorry, fixed that!
Yes I'm using JavaCV for the video decoding.
But then I'm converting to a openCvMat so I can do face recognition. (and trying to keep track of "which Mat")

and it dies with

Exception in thread "main" java.lang.UnsatisfiedLinkError: /private/var/folders/yf/n2ww6hgn0_vghpv9jb289pd8006t9p/T/opencv_openpnp3509792775981883221/nu/pattern/opencv/osx/x86_64/libopencv_java342.dylib: dlopen(/private/var/folders/yf/n2ww6hgn0_vghpv9jb289pd8006t9p/T/opencv_openpnp3509792775981883221/nu/pattern/opencv/osx/x86_64/libopencv_java342.dylib, 1): Library not loaded: /usr/local/opt/ffmpeg/lib/libavformat.58.dylib
  Referenced from: /private/var/folders/yf/n2ww6hgn0_vghpv9jb289pd8006t9p/T/opencv_openpnp3509792775981883221/nu/pattern/opencv/osx/x86_64/libopencv_java342.dylib
  Reason: image not found

from opencv.

salamanders avatar salamanders commented on July 4, 2024

PS: I tried a soft-link, I'm still suspicious that "my homebrew being local" could be the culprit.
But no luck there.
sudo ln -s /Users/MYUSERNAME/brew/homebrew/lib/libavcodec.58.dylib /usr/local/opt/ffmpeg/lib/libavcodec.58.dylib

from opencv.

salamanders avatar salamanders commented on July 4, 2024

Wow, it compiles and runs! I had to hack it:
sudo ln -s /Users/MYUSERNAME/brew/homebrew/Cellar/ffmpeg/4.1/lib /usr/local/opt/ffmpeg/lib
so I'm very suspicious that someone somewhere doesn't play nice with homebrew installing in a local directory.

from opencv.

vonnieda avatar vonnieda commented on July 4, 2024

Glad you got it sorted @salamanders. I'm hoping to get #38 fixed this weekend so hopefully people won't have to jump through this hoop.

from opencv.

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.