liuliu / ccv

C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library
http://libccv.org
Other
7.1k stars 1.71k forks source link

Issue ccv_read - assertion failed at scddetect #214

Closed carlosost closed 6 years ago

carlosost commented 6 years ago

Steps to help replicate the scenario:

  1. Clone ccv git repository
  2. cd lib
  3. autoconf configure.ac > configure
  4. ./configure
  5. cd ../bin
  6. make all
  7. /scddetect ../samples/lena.png ../samples/face.sqlite3

Than I get this error message: scddetect: scddetect.c:49: int main(int, char ): Assertion `image != 0' failed. Aborted (core dumped)

Trying to solve the problem and following some foruns I've found, I installed two libs to deal with png and jpeg files, like bellow:

  1. sudo yum install libpng-devel
  2. sudo yum install libjpeg-turbo-devel
  3. Returned to step 2 through 7

But I am still getting the error. Any help?

carlosost commented 6 years ago

I have changed the third line of makefile at ../bin directory like bellow, including what I think is the linking tags for libpng and libjpeg, but I am still getting the same error.

LDFLAGS := -L"../lib" -lccv -L"/usr/lib64" -lpng -ljpeg $(LDFLAGS)

liuliu commented 6 years ago

In the generated config.mk file (./lib/config.mk), if it cannot find libpng / libjpeg, you have to manually modify such that:

DEFINE_MACROS := -D HAVE_LIBPNG -D HAVE_LIBJPEG
LDFLAGS :=  -L${exec_prefix}/lib -lpng -ljpeg

and then do a make clean / make

carlosost commented 6 years ago

Thank you @liuliu . It worked!!!

Just for others with the same "problem", I folllowed your instructions like bellow:

Thank you so much!