Ask Your Question

rocrates's profile - activity

2016-11-16 02:20:11 -0600 received badge  Notable Question (source)
2015-12-28 04:57:53 -0600 received badge  Popular Question (source)
2015-06-25 03:48:20 -0600 received badge  Student (source)
2014-06-06 12:47:28 -0600 commented question [solved] opencv libpng version mismatch

Just to clarify, I think there are other ways to solve my issue...i tried to update system's libpng, but doesn't exist a newer version as a packet, so you can download and install a newer versiob (1.5.12 for example) but you'll have 2 different version in the system now... I was not able to tell ubuntu to use the 1.5.12 instead of its default version (1.2.5). That's why I decided to recompile opencv telling to not build libpng with its source, but use instead the system's version.

2014-06-06 12:41:33 -0600 commented question [solved] opencv libpng version mismatch

This is what I've undestood: by default Ubuntu 14.04 has libpng12-0 (version 1.2.5...this was my case), if you compile opencv-249 (download archive from website and compile) without cmake flag "BUILD_PNG=OFF" it will build the libpng from source contained in the opencv-249 (is libpng 1.5.12), if you see cmake results you see under Media I/O - PNG: Build... Compiling is fine, but when you try to run a java application using opencv, and this application requires libpng, you will get my error, because system is running version 1.2.5, but opencv was compiled with 1.5.12! If you put the flag, opencv will not compile libpng, but use the system library instead, so no mismatch error! I'm new to the linux world, so maybe I'm saying something wrong, but now it works!:)

2014-06-06 04:30:24 -0600 commented question [solved] opencv libpng version mismatch

Worked! Thank you, I compiled with flag BUILD_PNG=OFF and worked. Post your solution as a response, so i can vote you! :)

2014-05-31 12:44:40 -0600 received badge  Critic (source)
2014-05-31 12:43:36 -0600 received badge  Editor (source)
2014-05-31 12:42:27 -0600 asked a question [solved] opencv libpng version mismatch

Hi, I'm using opencv-2.4.9 on Ubuntu 14.04 and getting this error running my java application:

libpng warning: Application was compiled with png.h from libpng-1.5.12

libpng warning: Application is running with png.c from libpng-1.2.50

libpng error: Incompatible libpng version in application and library

As far as I understand opencv comes with libpng 1.5.12, but ubuntu 14.04 has version 1.2.50, so I installed libpng-1.5.12, but not sure did it properly because I get the same error. What can I check? Thank You

SOLUTION: Add flag BUILD_PNG=OFF to cmake. On the cmake results you'll see under Media I/O, PNG: "path to your" instead of Build...