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

[1.1.4] CvException when using find() in a project upgraded from 1.1.3 due to not supported png-image-type #21

Closed
FlamingGear opened this issue Aug 24, 2018 · 6 comments
Labels
bug Something isn't working fixed the problem has been fixed

Comments

@FlamingGear
Copy link

Being eager to make use of the both the improved OCR and the transparent masking, this week I upgraded an existing, in-progress project from 1.1.3 to 1.1.4 to attempt to make use of the new features.
Noticing that everything required is now bundled into one .jar file, I removed my old Sikuli 1.1.3 install directory & jar file, and imported the nightly build via maven. However, I can no longer run any of my tests using sikuli, because any attempt to find an image results in this error:

CvException [org.opencv.core.CvException: cv::Exception: OpenCV(3.4.2)  

C:\build\3_4_winpack-bindings-win64-vc14-static\opencv\modules\imgproc\src\templmatch.cpp:1102: error:  
(-215:Assertion failed) (depth == 0 || depth == 5) && type == _templ.type() && _img.dims() <= 2 in  
function 'cv::matchTemplate'
]

I'm unclear what could be causing this issue, as I'm not very clued up on the underlying opencv libraries, but I was previously able to make use of this exact image before so I don't believe that it is the issue unless a significant requirement for saved images has changed.

Eager to get to the bottom of this as, like I said, I'm excited to make use of the new stuff.

@RaiMan
Copy link
Owner

RaiMan commented Aug 24, 2018

Thanks for reporting.

Can you send me the relevant java statement(s) (as short as possible), the offending image and a screenshot, where it should be found?

if yes: sikulix--at--outlook--dot--com

@RaiMan RaiMan added the bug Something isn't working label Aug 24, 2018
@RaiMan RaiMan changed the title [1.1.4] CvException when using find() in a project upgraded from 1.1.3 [1.1.4] CvException when using find() in a project upgraded from 1.1.3 due to not supported png-image-type Aug 24, 2018
@RaiMan
Copy link
Owner

RaiMan commented Aug 24, 2018

In this case the images where produced with the help of some online service, which produce png-images, that in SikuliX internally result in BufferedImage of TYPE_BYTE_INDEXED (RGB without transparency but with a special color model).
It is fixed now in the latest build. Please test.

@FlamingGear
Copy link
Author

Confirmed as resolved locally! Thanks again for the quick turnaround.

@RaiMan
Copy link
Owner

RaiMan commented Aug 24, 2018

Thanks for feedback.

@RaiMan RaiMan closed this as completed Aug 24, 2018
@RaiMan RaiMan added the fixed the problem has been fixed label Aug 27, 2018
@FlamingGear
Copy link
Author

Hi Again RaiMan, just dropping in to ask when the Maven clone will be updated with this fix? I'm using Maven to simplify the build process on CI machines but the version found via Maven is from August. Thanks again.

@RaiMan
Copy link
Owner

RaiMan commented Sep 12, 2018

Uuups, sorry. Did not realize, that I left the OSSRH upload switched off after some testing.
Today's build should it bring back again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed the problem has been fixed
Projects
None yet
Development

No branches or pull requests

2 participants