Giter Site home page Giter Site logo

Comments (15)

heshanthenura avatar heshanthenura commented on June 8, 2024 1

Ill try and tell you.

from javacv.

codespearhead avatar codespearhead commented on June 8, 2024 1

I haven't used this library long enough to be able to troubleshoot problems, but I noticed it works out of the box in WSL (Ubuntu), but not in Git Bash (Windows), so I have a feeling strange errors might occur if you don't have GCC globally available in your environment when installing the dependencies. I haven't tested that theory though.

from javacv.

saudet avatar saudet commented on June 8, 2024

Please try again with version 1.5.10

from javacv.

saudet avatar saudet commented on June 8, 2024

Please follow the instructions at https://github.com/bytedeco/javacpp-presets/wiki/Debugging-UnsatisfiedLinkError-on-Windows

from javacv.

heshanthenura avatar heshanthenura commented on June 8, 2024

Thank you, I'll try.

from javacv.

codespearhead avatar codespearhead commented on June 8, 2024

Did it work? If so, can you close this issue?

from javacv.

steeveen avatar steeveen commented on June 8, 2024

I met the same problem and searching for help……

from javacv.

codespearhead avatar codespearhead commented on June 8, 2024

Can you provide us with an MRE?

from javacv.

steeveen avatar steeveen commented on June 8, 2024

Just Call ‘Loader.load(opencv_java.class)’ under RHEL-7, Java 8 ,SpringBoot 2.7.2

from javacv.

steeveen avatar steeveen commented on June 8, 2024

with the dependency of javacv-platform 1.5.10, opencv-platform 1.5.10 , openblas-platform 1.5.10

from javacv.

codespearhead avatar codespearhead commented on June 8, 2024

It's worth noting that Spring Boot 2.7 no longer has OSS support.

I just tried it with my current setup and everything worked as expected (Spring Boot 3.2.4, OpenJDK Temurin-17.0.10+7).

  1. Create a Spring Boot project:
mkdir mre &&
cd mre &&
curl https://start.spring.io/starter.tgz -d dependencies=web,devtools -d type=maven-project | tar -xzvf -
  1. Add JavaCV to it:
<dependency>
    <groupId>org.bytedeco</groupId>
    <artifactId>javacv-platform</artifactId>
    <version>1.5.10</version>
</dependency>
  1. Create an endpoint that invokes Loader.load(opencv_java.class):
package com.example.demo;

import org.bytedeco.javacpp.Loader;
import org.bytedeco.opencv.opencv_java;
import org.bytedeco.opencv.global.opencv_core;
import org.bytedeco.opencv.opencv_core.Mat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Demo {

    @GetMapping
    public String doGet(){
        Loader.load(opencv_java.class);
        Mat mat = Mat.eye(3, 3, opencv_core.CV_8UC1).asMat();
        return "mat = " + mat.toString() + "\n";
    }

}
  1. Call the endpoint:
curl localhost:8080
# mat = org.bytedeco.opencv.opencv_core.Mat[width=3,height=3,depth=8,channels=1]

from javacv.

steeveen avatar steeveen commented on June 8, 2024

Did you do your test on red hat OS? My code can run well on windows10 but meet problem just on redhat7.

from javacv.

codespearhead avatar codespearhead commented on June 8, 2024

I am not in a position to directly experiment with the suggested setup at this time.

For anyone who is though, try creating a Dockerfile in the root directory of the MRE with the following content:

FROM registry.access.redhat.com/ubi8/openjdk-17:1.19-1

WORKDIR /app
COPY . .

RUN mvn clean package -DskipTests
EXPOSE 8080

CMD ["java", "-jar", "target/app-0.0.1-SNAPSHOT.jar"]

Then run:

docker build -t demo:tag . &&
docker run --rm -it demo:tag

from javacv.

steeveen avatar steeveen commented on June 8, 2024

I have a further problem. I found that problem is caused by that there is no CXXABI 1.3.8 in my environment. Does anyone have any idea on this?

from javacv.

steeveen avatar steeveen commented on June 8, 2024

I got the libstdc.6.0.28.so, which can support CXXABI_1_3_8. I would have a try to replace libstdc.6.0.19.so with this file. I hope it can work.

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.