liuliu / ccv

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

SWT Implementation #105

Open uditroy opened 10 years ago

uditroy commented 10 years ago

Hi

While running SWT on an image, the function ccv_swt() is returning only a matrix of zeros as the output if run on an image. Following is the code used, ccv_dense_matrix_t* wordimage = 0; ccv_read(argv[1], &wordimage, CCV_IO_GRAY | CCV_IO_ANY_FILE); ccv_dense_matrix_t* swtimage = 0; ccv_swt(wordimage, &swtimage, 0 , ccv_swt_default_params);

If I run bin/swtdetect.c I get a segmentation fault at ccv_swt_detect_words(). Kindly suggest how to fix the issue. Thanks !

liuliu commented 10 years ago

Hey, can you show me the command line you use, the file type you use, and can you assert(wordimage != 0) before calling ccv_swt?

uditroy commented 10 years ago

Thank you for the reply! I am getting "libpng error: Read Error" for png images and assertion failure for jpg images. I use the following command to compile in a bash shell, gcc swtdetect.c -lccv -lpng "-L/global/liuliu-ccv-c43d6d6/lib" "-I/global/liuliu-ccv-c43d6d6/lib"

liuliu commented 10 years ago

What's in your ./lib/config.mk file?

arlahiru commented 9 years ago

I am facing the same issue. Please find the console snapshot attached. I have compiled the lib and bin via make file and executed the swt program. I got assert(image != 0) failed. What did I miss? Can you help on this? screenshot from 2015-09-15 00 50 32

arlahiru commented 9 years ago

Solved it! Reason: Compiled the lib folder before install libpng/jpeg packages. Fix: Compiled the lib folder again after install libpng/jpeg packages.

Thanks lot for making CCV lib. Its really helpful and saved my time! May triple gem bless you...