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

Starting issue. RuntimeException. Seems to be a fix path in the lib #1042

Closed
peymanman opened this issue Aug 8, 2018 · 4 comments
Closed

Comments

@peymanman
Copy link

Hi,

I just tried to use the very first example

public static void main(String[] args) {
        opencv_core.IplImage image = cvLoadImage(path);
        if (image != null) {
            cvSmooth(image, image);
            cvSaveImage(path, image);
            cvReleaseImage(image);
        }
    }

The exception seems to be related to a fix path in the lib?! Anyone?

Exception in thread "main" java.lang.RuntimeException: OpenCV(3.4.2) /Users/travis/build/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv-3.4.2/modules/core/src/matrix_wrap.cpp:800: error: (-215:Assertion failed) (flags & FIXED_TYPE) != 0 in function 'type'

	at org.bytedeco.javacpp.opencv_imgcodecs.cvSaveImage(Native Method)
	at ai.peyman.face.Test.main(Test.java:15)
@peymanman peymanman changed the title Starting issue. RuntimeException seems to be a fix path in the lib Starting issue. RuntimeException. Seems to be a fix path in the lib Aug 8, 2018
@saudet
Copy link
Member

saudet commented Aug 9, 2018

It's a known bug in the C API of OpenCV that they are not going to fix, see issue #998. I guess this means it's time to update the README.md file of JavaCV and use the C++ API instead...

@saudet
Copy link
Member

saudet commented Aug 10, 2018

Ok, it's done! Please try with the updated code using the C++ API. Thanks for reporting!

@saudet saudet closed this as completed Aug 10, 2018
@cpotter1
Copy link

Sorry for being thick on this, but how do we use this with JavaCV ?

@saudet
Copy link
Member

saudet commented Dec 24, 2018

@cpotter1 Refer to the new Demo class, it uses the C++ API.

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

No branches or pull requests

3 participants