opencv windows dlls bugs

asked 2016-11-04 23:18:48 -0600

mika S gravatar image

updated 2016-11-05 20:45:58 -0600

are opencv windows dlls buggy? I have downloaded opencv for windows which came with dlls built using vc12. I am using them in a project inside visual studio 2013. AndI am doing this:

 auto mat = imdecode(data, IMREAD_UNCHANGED);

Both x64 debug and release dlls work good with my test data. The x86 release dlls, however, give a mat that has a huge (wrong) number of rows and columns from the same data. Using debug x86 dlls with the debug build works fine.

I also found some stackoverflow posts with people facing similar issues http://stackoverflow.com/questions/91...

Have others encountered this? Are there any ways around this ?

edit retag flag offensive close merge delete

Comments

No, not really. Are you running on a really old architecture? Did you download a set of dlls and not use the installer? It's possible you have a set of dlls mis-matched in compiler flags or architecture. If you build from source you avoid those issues guaranteed. I think the installer from the website (which is currently down, check back later) handles those things too.

Tetragramm gravatar imageTetragramm ( 2016-11-04 23:42:26 -0600 )edit

instead of linking to an SO question from 2012 (!) , rather try to show us, what you're doing.

berak gravatar imageberak ( 2016-11-05 00:35:36 -0600 )edit

I have updated my question. This is using x86 release dlls in visual studio 2013.

mika S gravatar imagemika S ( 2016-11-05 20:46:23 -0600 )edit

are there actual x86 libs for your compiler in your download ?

(i'm getting some doubt here.l)

berak gravatar imageberak ( 2016-11-05 21:06:38 -0600 )edit
1

I downloaded opencv for windows that included a build folder with x86/vc12. vc12 is visual studio 2013 .

mika S gravatar imagemika S ( 2016-11-05 21:46:56 -0600 )edit

Is your program compiled in x86 too? Mixing x86 and x64 is not a good idea.

Tetragramm gravatar imageTetragramm ( 2016-11-06 09:14:37 -0600 )edit

Yes, x86. Btw i compiled the source too with vs 2013 and hit the same problem with x86 release dlls. This is very weird

mika S gravatar imagemika S ( 2016-11-06 13:32:38 -0600 )edit

The fact you're having problems with the x86 stuff you compiled from source indicates it's likely a problem with your project and linking to OpenCV. I'll give it a shot on my machine sometime tonight or tomorrow and see, but I'd start looking at your setting and see if there's anything different between your x86 and x64 builds. Or perhaps something that should be different but isn't.

Tetragramm gravatar imageTetragramm ( 2016-11-06 18:05:49 -0600 )edit

But the x86 debug works just fine. Ill check and report bacj

mika S gravatar imagemika S ( 2016-11-06 18:11:31 -0600 )edit

I can confirm that I did not find any problem with the project. The image is a png image. To reproduce this run the imdecode snippet above on the following base64 of a png : http://pastebin.com/kNM5cDDZ You will have to first decode the base64 to a character array.

mika S gravatar imagemika S ( 2016-11-07 12:10:47 -0600 )edit