Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsatisfied Link Eception #2

Open
cuzzysoft opened this issue Feb 12, 2021 · 3 comments
Open

Unsatisfied Link Eception #2

cuzzysoft opened this issue Feb 12, 2021 · 3 comments

Comments

@cuzzysoft
Copy link

I've added opencv lib to path put I still get this error

run: Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1302) at org.bytedeco.javacpp.Loader.load(Loader.java:1043) at org.bytedeco.javacpp.Loader.load(Loader.java:935) at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.bytedeco.javacpp.Loader.load(Loader.java:994) at org.bytedeco.javacpp.Loader.load(Loader.java:951) at main.java.me.jakejmattson.facialrecognition.FacialRecognition.main(FacialRecognition.java:30) Caused by: java.lang.UnsatisfiedLinkError: no opencv_imgproc401 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1302) at org.bytedeco.javacpp.Loader.load(Loader.java:1021) ... 7 more C:\Users\EMPEROR-CUZZY\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 3 seconds)

@JakeJMattson
Copy link
Owner

I have pushed a change swapping the Maven dependency and updating the OpenCV version. You shouldn't have to mess with the path yourself as the dependency used contains the binaries needed to use the library.

@cuzzysoft
Copy link
Author

cuzzysoft commented Feb 13, 2021

Thanks much for your reply.
I've downloaded the update and opened it using Netbeans10. But I get error during building

`BUILD FAILURE
------------------------------------------------------------------------
Total time: 3.928 s
Finished at: 2021-02-12T16:39:19+01:00
Final Memory: 8M/34M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project FacialRecognition: Fatal error compiling: error: invalid target release: 15 -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
`

@cuzzysoft
Copy link
Author

I've been able to rectify the above error, then another situation

[ WARN:0] global C:\build\master_winpack-bindings-win64-vc14-static\opencv\modules\videoio\src\cap_msmf.cpp (906) CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -2147483638
Exception in thread "main" java.lang.IllegalArgumentException: Width (0) and height (0) must be > 0
	at java.desktop/java.awt.image.SampleModel.<init>(SampleModel.java:126)
	at java.desktop/java.awt.image.ComponentSampleModel.<init>(ComponentSampleModel.java:140)
	at java.desktop/java.awt.image.PixelInterleavedSampleModel.<init>(PixelInterleavedSampleModel.java:87)
	at java.desktop/java.awt.image.Raster.createInterleavedRaster(Raster.java:642)
	at java.desktop/java.awt.image.Raster.createInterleavedRaster(Raster.java:278)
	at java.desktop/java.awt.image.Raster.createInterleavedRaster(Raster.java:212)
	at java.desktop/java.awt.image.ComponentColorModel.createCompatibleWritableRaster(ComponentColorModel.java:2827)
	at java.desktop/java.awt.image.BufferedImage.<init>(BufferedImage.java:420)
	at me.jakejmattson.facialrecognition.ImageFrame.convertMatToImage(ImageFrame.java:229)
	at me.jakejmattson.facialrecognition.ImageFrame.showImage(ImageFrame.java:204)
	at me.jakejmattson.facialrecognition.FacialRecognition.capture(FacialRecognition.java:62)
	at me.jakejmattson.facialrecognition.FacialRecognition.main(FacialRecognition.java:30)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants