Giter Club home page Giter Club logo

ccv's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ccv's Issues

missing ccv_bbf_params_t

hi , i compiled ccv , it works from the builtin samples

but i found the face detect sample on the website (http://libccv.org/galaxy-guide/) couldnt be compiled

is this a outdate document? (by greping ccv_bbf_params_t in the top of soucecode directory, i found nothing)

Compile problem - "multiple definition of..."

I successfully used make to compile the library, however I am now trying to compile one of your demo programs bin/convert.c.

using the following command:

clang convert.c -L"/users/max/Work/Utils/ccv_max/lib" -I"/users/max/Work/Utils/ccv_max/lib" -lccv -o         convert `cat /users/max/Work/Utils/ccv_max/lib/.LN` -lm -v

I get the following

clang version 3.3 (trunk 168589)
Target: x86_64-unknown-linux-gnu
Thread model: posix
 "/users/max/Work/Utils/llvm/Debug+Asserts/bin/clang" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name convert.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.17.50.0.6 -momit-leaf-frame-pointer -v -resource-dir /users/max/Work/Utils/llvm/Debug+Asserts/bin/../lib/clang/3.3 -I /users/max/Work/Utils/ccv_max/lib -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /usr/local/include -internal-isystem /users/max/Work/Utils/llvm/Debug+Asserts/bin/../lib/clang/3.3/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /users/max/Work/Utils/ccv_max/bin -ferror-limit 19 -fmessage-length 101 -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/convert-SOEXZs.o -x c convert.c
clang -cc1 version 3.3 based upon LLVM 3.3svn default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /users/max/Work/Utils/ccv_max/lib
 /usr/local/include
 /users/max/Work/Utils/llvm/Debug+Asserts/bin/../lib/clang/3.3/include
 /usr/include
End of search list.
 "/usr/bin/ld" --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o swtdetect /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbegin.o -L/users/max/Work/Utils/ccv_max/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../.. -L/lib -L/usr/lib /tmp/convert-SOEXZs.o -lccv -lm -ljpeg -lpng -lz -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o): In function `gnu_dev_major':
ccv_memory.c:(.text+0x230): multiple definition of `gnu_dev_major'
/tmp/convert-SOEXZs.o:convert.c:(.text+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `gnu_dev_major' changed from 48 in /tmp/convert-SOEXZs.o to 26 in /users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o)
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o): In function `gnu_dev_makedev':
ccv_memory.c:(.text+0x270): multiple definition of `gnu_dev_makedev'
/tmp/convert-SOEXZs.o:convert.c:(.text+0x60): first defined here
/usr/bin/ld: Warning: size of symbol `gnu_dev_makedev' changed from 74 in /tmp/convert-SOEXZs.o to 46 in /users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o)
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o): In function `gnu_dev_minor':
ccv_memory.c:(.text+0x250): multiple definition of `gnu_dev_minor'
/tmp/convert-SOEXZs.o:convert.c:(.text+0x30): first defined here
/usr/bin/ld: Warning: size of symbol `gnu_dev_minor' changed from 44 in /tmp/convert-SOEXZs.o to 17 in /users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o)
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strcspn_c1':
3rdparty/sha1/sha1.c:(.text+0x0): multiple definition of `__strcspn_c1'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x2a0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strcspn_c2':
3rdparty/sha1/sha1.c:(.text+0x30): multiple definition of `__strcspn_c2'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x2d0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strcspn_c3':
3rdparty/sha1/sha1.c:(.text+0x60): multiple definition of `__strcspn_c3'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x300): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strpbrk_c2':
3rdparty/sha1/sha1.c:(.text+0x120): multiple definition of `__strpbrk_c2'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x3c0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strpbrk_c3':
3rdparty/sha1/sha1.c:(.text+0x160): multiple definition of `__strpbrk_c3'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x400): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strsep_1c':
3rdparty/sha1/sha1.c:(.text+0x200): multiple definition of `__strsep_1c'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x4a0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strsep_2c':
3rdparty/sha1/sha1.c:(.text+0x240): multiple definition of `__strsep_2c'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x4e0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strsep_3c':
3rdparty/sha1/sha1.c:(.text+0x270): multiple definition of `__strsep_3c'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x510): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strspn_c1':
3rdparty/sha1/sha1.c:(.text+0xa0): multiple definition of `__strspn_c1'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x340): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strspn_c2':
3rdparty/sha1/sha1.c:(.text+0xc0): multiple definition of `__strspn_c2'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x360): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strspn_c3':
3rdparty/sha1/sha1.c:(.text+0xf0): multiple definition of `__strspn_c3'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x390): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `__strtok_r_1c':
3rdparty/sha1/sha1.c:(.text+0x1b0): multiple definition of `__strtok_r_1c'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x450): first defined here
... LOTS MORE OF THE SAME
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `gnu_dev_major':
3rdparty/sha1/sha1.c:(.text+0x2b0): multiple definition of `gnu_dev_major'
/tmp/convert-SOEXZs.o:convert.c:(.text+0x0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `gnu_dev_makedev':
3rdparty/sha1/sha1.c:(.text+0x2f0): multiple definition of `gnu_dev_makedev'
/tmp/convert-SOEXZs.o:convert.c:(.text+0x60): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(sha1.o): In function `gnu_dev_minor':
3rdparty/sha1/sha1.c:(.text+0x2d0): multiple definition of `gnu_dev_minor'
/tmp/convert-SOEXZs.o:convert.c:(.text+0x30): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_io.o): In function `__signbit':
ccv_io.c:(.text+0x560): multiple definition of `__signbit'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x560): first defined 
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `fgetc_unlocked':
ccv_cache.c:(.text+0x30): multiple definition of `fgetc_unlocked'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x30): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `fputc_unlocked':
ccv_cache.c:(.text+0xb0): multiple definition of `fputc_unlocked'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0xb0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `getc_unlocked':
ccv_cache.c:(.text+0x50): multiple definition of `getc_unlocked'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x50): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `getchar':
ccv_cache.c:(.text+0x20): multiple definition of `getchar'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x20): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `getchar_unlocked':
ccv_cache.c:(.text+0x70): multiple definition of `getchar_unlocked'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x70): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `gnu_dev_major':
ccv_cache.c:(.text+0x230): multiple definition of `gnu_dev_major'
/tmp/convert-SOEXZs.o:convert.c:(.text+0x0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `gnu_dev_makedev':
ccv_cache.c:(.text+0x270): multiple definition of `gnu_dev_makedev'
/tmp/convert-SOEXZs.o:convert.c:(.text+0x60): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `gnu_dev_minor':
ccv_cache.c:(.text+0x250): multiple definition of `gnu_dev_minor'
/tmp/convert-SOEXZs.o:convert.c:(.text+0x30): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `putc_unlocked':
ccv_cache.c:(.text+0xe0): multiple definition of `putc_unlocked'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0xe0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `putchar':
ccv_cache.c:(.text+0xa0): multiple definition of `putchar'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0xa0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `putchar_unlocked':
ccv_cache.c:(.text+0x110): multiple definition of `putchar_unlocked'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x110): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `strtod':
ccv_cache.c:(.text+0x160): multiple definition of `strtod'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x160): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `strtof':
ccv_cache.c:(.text+0x190): multiple definition of `strtof'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x190): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `strtol':
ccv_cache.c:(.text+0x170): multiple definition of `strtol'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x170): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `strtold':
ccv_cache.c:(.text+0x1a0): multiple definition of `strtold'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x1a0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `strtoll':
ccv_cache.c:(.text+0x1d0): multiple definition of `strtoll'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x1d0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `strtoq':
ccv_cache.c:(.text+0x1b0): multiple definition of `strtoq'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x1b0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `strtoul':
ccv_cache.c:(.text+0x180): multiple definition of `strtoul'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x180): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `strtoull':
ccv_cache.c:(.text+0x1e0): multiple definition of `strtoull'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x1e0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `strtouq':
ccv_cache.c:(.text+0x1c0): multiple definition of `strtouq'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x1c0): first defined here
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_cache.o): In function `vprintf':
ccv_cache.c:(.text+0x0): multiple definition of `vprintf'
/users/max/Work/Utils/ccv_max/lib/libccv.a(ccv_memory.o):ccv_memory.c:(.text+0x0): first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using clang from the llvm svn trunk. http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-December/027959.html seems to suggest it may be a c89/c99 issue. Do you have any idea how to solve this?

Create a (Google?) group

I'm unsure how to reach you otherwise.

To me it seems that CCV generates a lot of attention. That is not to say that there aren't any questions. I believe a group in which members can help each other out would be beneficial to the project.

Warnings when building with gcc for OpenMP

I'm trying to build the library with OpenMP support, to train my own classifier. As far as I can tell, clang doesn't support OpenMP, so I'm using gcc. Upon building, I get some interesting warnings on 10.7 that might be of interest.


$ make

 USE: gcc
 COMPILE FLAGS: -msse2 -D USE_OPENMP -fopenmp
 LINK FLAGS: -lm -lgomp

gcc ccv_cache.c -o ccv_cache.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
ccv_cache.c: In function ‘ccv_cache_delete’:
ccv_cache.c:428: warning: comparison is always true due to limited range of data type
gcc ccv_memory.c -o ccv_memory.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc 3rdparty/sha1/sha1.c -o 3rdparty/sha1/sha1.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc 3rdparty/kissfft/kiss_fft.c -o 3rdparty/kissfft/kiss_fft.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc 3rdparty/kissfft/kiss_fftnd.c -o 3rdparty/kissfft/kiss_fftnd.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc 3rdparty/kissfft/kiss_fftr.c -o 3rdparty/kissfft/kiss_fftr.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc 3rdparty/kissfft/kiss_fftndr.c -o 3rdparty/kissfft/kiss_fftndr.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc 3rdparty/kissfft/kissf_fft.c -o 3rdparty/kissfft/kissf_fft.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc 3rdparty/kissfft/kissf_fftnd.c -o 3rdparty/kissfft/kissf_fftnd.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc 3rdparty/kissfft/kissf_fftr.c -o 3rdparty/kissfft/kissf_fftr.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc 3rdparty/kissfft/kissf_fftndr.c -o 3rdparty/kissfft/kissf_fftndr.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc ccv_io.c -o ccv_io.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc ccv_numeric.c -o ccv_numeric.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
ccv_numeric.c: In function ‘ccv_distance_transform’:
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1126: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1128: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1135: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
ccv_numeric.c:1137: warning: comparison is always false due to limited range of data type
gcc ccv_algebra.c -o ccv_algebra.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
ccv_algebra.c: In function ‘ccv_sat’:
ccv_algebra.c:108: warning: comparison is always false due to limited range of data type
ccv_algebra.c:108: warning: comparison is always false due to limited range of data type
gcc ccv_util.c -o ccv_util.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
ccv_util.c: In function ‘ccv_flatten’:
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c:115: warning: comparison is always false due to limited range of data type
ccv_util.c: In function ‘ccv_compress_sparse_matrix’:
ccv_util.c:407: warning: comparison is always false due to limited range of data type
ccv_util.c:407: warning: comparison is always false due to limited range of data type
ccv_util.c:422: warning: comparison is always false due to limited range of data type
ccv_util.c:422: warning: comparison is always false due to limited range of data type
ccv_util.c: In function ‘ccv_slice’:
ccv_util.c:527: warning: comparison is always false due to limited range of data type
ccv_util.c:527: warning: comparison is always false due to limited range of data type
ccv_util.c: In function ‘ccv_move’:
ccv_util.c:556: warning: comparison is always false due to limited range of data type
ccv_util.c:556: warning: comparison is always false due to limited range of data type
gcc ccv_basic.c -o ccv_basic.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
ccv_basic.c: In function ‘ccv_sobel’:
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c:143: warning: comparison is always false due to limited range of data type
ccv_basic.c: In function ‘ccv_blur’:
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:822: warning: comparison is always false due to limited range of data type
ccv_basic.c:845: warning: comparison is always false due to limited range of data type
ccv_basic.c:845: warning: comparison is always false due to limited range of data type
ccv_basic.c:845: warning: comparison is always false due to limited range of data type
ccv_basic.c:845: warning: comparison is always false due to limited range of data type
ccv_basic.c:845: warning: comparison is always false due to limited range of data type
ccv_basic.c:845: warning: comparison is always false due to limited range of data type
ccv_basic.c:845: warning: comparison is always false due to limited range of data type
ccv_basic.c:845: warning: comparison is always false due to limited range of data type
gcc ccv_classic.c -o ccv_classic.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
ccv_classic.c: In function ‘ccv_hog’:
ccv_classic.c:186: warning: comparison is always false due to limited range of data type
ccv_classic.c: In function ‘ccv_otsu’:
ccv_classic.c:359: warning: comparison is always false due to limited range of data type
gcc ccv_daisy.c -o ccv_daisy.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc ccv_sift.c -o ccv_sift.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc ccv_bbf.c -o ccv_bbf.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc ccv_mser.c -o ccv_mser.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc ccv_swt.c -o ccv_swt.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
gcc ccv_dpm.c -o ccv_dpm.o -c -O3 -ffast-math -Wall -msse2 -D USE_OPENMP -fopenmp
ar rcs libccv.a ccv_cache.o ccv_memory.o 3rdparty/sha1/sha1.o 3rdparty/kissfft/kiss_fft.o 3rdparty/kissfft/kiss_fftnd.o 3rdparty/kissfft/kiss_fftr.o 3rdparty/kissfft/kiss_fftndr.o 3rdparty/kissfft/kissf_fft.o 3rdparty/kissfft/kissf_fftnd.o 3rdparty/kissfft/kissf_fftr.o 3rdparty/kissfft/kissf_fftndr.o ccv_io.o ccv_numeric.o ccv_algebra.o ccv_util.o ccv_basic.o ccv_classic.o ccv_daisy.o ccv_sift.o ccv_bbf.o ccv_mser.o ccv_swt.o ccv_dpm.o

Compilation error (and fix)

When trying to run 'make' in the 'bin' directory, I get the following compilation errors:

$ make
make -C ../lib
make[1]: Entering directory `/home/abetusk/Downloads/liuliu-ccv-43ec190/lib'

USE: clang
COMPILE FLAGS: -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_CBLAS
LINK FLAGS: -lm -ljpeg -lpng -lz -lgsl -lfftw3f -lfftw3 -llinear -lblas

make[2]: Entering directory /home/abetusk/Downloads/liuliu-ccv-43ec190/lib' make[2]: Nothing to be done forall'.
make[2]: Leaving directory /home/abetusk/Downloads/liuliu-ccv-43ec190/lib' make[1]: Leaving directory/home/abetusk/Downloads/liuliu-ccv-43ec190/lib'
clang -o bbffmt bbffmt.o -L../lib -lccv -lm -ljpeg -lpng -lz -lgsl -lfftw3f -lfftw3 -llinear -lblas
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference to cblas_ctrmv' /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference tocblas_zswap'
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference to cblas_zsymm' /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference tocblas_cgeru'
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference to cblas_sgemm' /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference tocblas_ctrsv'
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference to cblas_sgemv' /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference tocblas_srotg'
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference to cblas_zgemm' /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference tocblas_cdotu_sub'
...

/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference to cblas_daxpy' /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libgsl.so: undefined reference tocblas_csyrk'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bbffmt] Error 1

Adding ' -lgslcblas' to the end of the '../lib/.LN' file seems to fix the problem for me.

Examples

Hi @liuliu,

It would be extraordinarily useful for CV n00bs, e.g. myself, if there was sample code for each of the functions, specifically for ccv_swt. It would be awesome it someone could contribute that.

Thank you for releasing this library.

S

tld in javascript?

I was just wondering: Are there any plans of producing a javascript version of the tld algorithm working on typed rgba arrays for using with canvas elements? That would be awesome!

ccv_optical_flow_lucas_kanade design

hi
looking at current LK implementation it seems we cant provide predefined/precomputed image pyramids to it. so each time u should recreate not only new pyramid but also previous image pyramid. as u may guess its not the best way to handle it...
i would create image pyramid structure to handle that.

,

,

Unable to duplicate BBF test accuracy

I'm new to ccv, so I thought I'd start by building latest stable (and unstable), and at least see if I could duplicate the bbfdetect face detection accuracy score from https://github.com/liuliu/ccv/blob/stable/doc/bbf.md

Unfortunately, I don't seem to be able to do so; I only get a score of "53.82% (30)" when I follow the steps; far worse than the quoted "82.97% (12)". I get the same result for stable and unstable branches.

I'm running on OSX 10.8.3 with the following lib/config.mk:

XCODE_SDK := macosx10.8
ARCH := x86_64
CC := clang
AR := ar
CFLAGS := -I/usr/local/include -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK
LDFLAGS := -L/usr/local/lib -lm -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -ljpeg -lpng -lz -L/usr/X11/lib -lfftw3f -lfftw3 -llinear -framework Accelerate

I have local installs in /usr/local of libpng(1.5.14), libjpeg(v9), fftw(3.3.3), and linear(1.93). I also tried gsl(1.15), with same results. I have XCode(4.6.1) with up-to-date command line tools etc.

I converted the CMU gif files to png as per your example, using ImageMagick (6.8.3-10, darwin 12.3.0).

My generated CMU filelist.txt has 130 entries, and truth.txt has 511 entries.
After running bbfdetect on filelist.txt, the generated result.txt has 305 entries.

Do you have any thoughts or suggestions as to how I might be able debug this further, so that I can match your results from the bbf.md doc?

Thanks.

ccv_sobel() speed improvements

While profiling some of the different built in functions I noticed that ccv_sobel() appears to consume a significant amount of time particularly on iOS devices. I would assume the best way to attempt to improve the performance would be to use SIMD instructions, like NEON for ARM or MMX for Intel. However given the way the current function is implemented it seems like it could become messy and a non-trivial task. Is this as good as it gets or is there a way to get performance up cleanly?

Error when building for HTTP

I'm getting the following error when trying to the HTTP build

cd serve/ && make && ./ccv

make[1]: *** No rule to make target `ccv_icf.o', needed by `libccv.a'.  Stop.
make: *** [libccv.a] Error 2

I'm running on mac 10.8 and this is my config.mk

XCODE_SDK := macosx10.8
ARCH := x86_64
CC := clang
AR := ar
CFLAGS := -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk 
LDFLAGS := -lm -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk 

Any ideas?

compile dpm creator liblinear locally problem

Hi I am trying to run dpmcreate in a cluster which has not liblinear installed (Linux). Is there a way to compile and run ccv with the dependencies "installed" locally? I'll like a lot to avoid to use the matlab implementation. I'll really appreciate any help from the ones that have already compiled like that. ([email protected]).

Thnaks,
Guido.

compilation issue on mac os x 10.8

I have almost most of the dependencies installed, but I still can't manage to finish the compilation process. There seems to be a problem in linking stage of the process. Because object files are compiled.

When I do make in lib folder I don't get errors and everything seems ok:

➭ make 
clang ccv_cache.c -o ccv_cache.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_memory.c -o ccv_memory.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/sha1/sha1.c -o 3rdparty/sha1/sha1.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/kissfft/kiss_fft.c -o 3rdparty/kissfft/kiss_fft.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/kissfft/kiss_fftnd.c -o 3rdparty/kissfft/kiss_fftnd.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/kissfft/kiss_fftr.c -o 3rdparty/kissfft/kiss_fftr.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/kissfft/kiss_fftndr.c -o 3rdparty/kissfft/kiss_fftndr.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/kissfft/kissf_fft.c -o 3rdparty/kissfft/kissf_fft.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/kissfft/kissf_fftnd.c -o 3rdparty/kissfft/kissf_fftnd.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/kissfft/kissf_fftr.c -o 3rdparty/kissfft/kissf_fftr.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/kissfft/kissf_fftndr.c -o 3rdparty/kissfft/kissf_fftndr.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/dsfmt/dSFMT.c -o 3rdparty/dsfmt/dSFMT.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang 3rdparty/sfmt/SFMT.c -o 3rdparty/sfmt/SFMT.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_io.c -o ccv_io.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_numeric.c -o ccv_numeric.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_algebra.c -o ccv_algebra.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_util.c -o ccv_util.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_basic.c -o ccv_basic.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_resample.c -o ccv_resample.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_transform.c -o ccv_transform.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_classic.c -o ccv_classic.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_daisy.c -o ccv_daisy.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_sift.c -o ccv_sift.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_bbf.c -o ccv_bbf.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_mser.c -o ccv_mser.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_swt.c -o ccv_swt.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_dpm.c -o ccv_dpm.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_tld.c -o ccv_tld.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_ferns.c -o ccv_ferns.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang ccv_icf.c -o ccv_icf.o -c -O3 -ffast-math -Wall -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
ccv_icf.c:587:84: warning: format specifies type 'unsigned long' but the argument has type 'unsigned long long' [-Wformat]
        printf("\n - features are precomputed on examples and will occupy %luM memory\n", (uint64_t)(feature_size * step) / (1024 * 1024));
                                                                          ~~~             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                          %llu
1 warning generated.
ar rcs libccv.a ccv_cache.o ccv_memory.o 3rdparty/sha1/sha1.o 3rdparty/kissfft/kiss_fft.o 3rdparty/kissfft/kiss_fftnd.o 3rdparty/kissfft/kiss_fftr.o 3rdparty/kissfft/kiss_fftndr.o 3rdparty/kissfft/kissf_fft.o 3rdparty/kissfft/kissf_fftnd.o 3rdparty/kissfft/kissf_fftr.o 3rdparty/kissfft/kissf_fftndr.o 3rdparty/dsfmt/dSFMT.o 3rdparty/sfmt/SFMT.o ccv_io.o ccv_numeric.o ccv_algebra.o ccv_util.o ccv_basic.o ccv_resample.o ccv_transform.o ccv_classic.o ccv_daisy.o ccv_sift.o ccv_bbf.o ccv_mser.o ccv_swt.o ccv_dpm.o ccv_tld.o ccv_ferns.o ccv_icf.o

But when I make in bin folder I get the following erros:

➭ make
make -C ../lib
make[1]: Nothing to be done for `all'.
clang bbffmt.c -o bbffmt.o -c -O3 -Wall -I"../lib" -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
clang -o bbffmt bbffmt.o -L"../lib" -lccv -lm -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -ljpeg -lpng -lz -L/usr/X11/lib -lgsl -lfftw3f -lfftw3 -llinear -framework Accelerate -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/usr/lib
ld: library not found for -ljpeg
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bbffmt] Error 1

I have changed the config.mk file to this:

XCODE_SDK := macosx10.8
ARCH := x86_64
CC := clang
AR := ar
CFLAGS := -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -msse2 -D HAVE_SSE2 -D HAVE_LIBJPEG -D HAVE_LIBPNG -I/usr/X11/include -D HAVE_GSL -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_ACCELERATE_FRAMEWORK -I/usr/local/include -I/Users/yasser/installs/liblinear-1.93 -I/Users/yasser/installs/jpeg-9
LDFLAGS := -lm -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -ljpeg -lpng -lz -L/usr/X11/lib -lgsl -lfftw3f -lfftw3 -llinear -framework Accelerate

I think this should be a simple issue but I couldn't fix it.

Please give me a hint!

Node module

Is there any chance you can publish the JS version on NPM?

Design choices : anonymous structs

Hey,

I was wondering if you could expand on the decision of using anonymous structs in ccv such as

typedef struct {
    int type;
    uint64_t sig;
    ...
} ccv_dense_matrix_t;

This prevents forward-declaring of ccv_dense_matrix_t and I can't seem to figure out where you could benefit from such a design choice.

I would actually benefit from such changes, would you accept a pull request naming these structs if I were to make one ?

Is it worthwhile submitting Win32 MSVC compilation pull requests?

libccv seems like a great project, but it certainly would make life easier for me if it could build on Microsoft's compiler.

A short scan through the source leads me to believe that there is actually a very small amount of gcc-specific code in there.

Would you be willing to accept pull requests aimed at compiling directly on MSVC?

Memory access out of allocated range

On Windows XP using gcc (GCC) 4.4.3 32-bit, I get segfaults when running

siftmatch.exe ..\samples\scene.png ..\samples\book.png

These segfaults happen, because in ccv_sift(), the access to the bf, cf and uf pointers sometimes goes before the allocated area, whenever

offset = ix + (iy - y) * cols

becomes more negative than bf etc. have been incremented.

No such crash happens on Linux 32-bit with gcc 4.3.2, but I suspect that the out of bounds memory access just isn't fatal there.

I have "fixed" this by adding a guarding statement at the start of the converging loop:

                        /* iteratively converge to meet subpixel accuracy */
                        for (k = 0; k < 5; k++)
                        {
                            offset = ix + (iy - y) * cols;
                            if(    sentinel_bf + offset < 0
                                || sentinel_cf + offset < 0
                                || sentinel_uf + offset < 0) {
                                printf("In3 (k=%i, offset=%i, ix=%i, iy=%i, y=%i, cols=%i)\n",k, offset, ix, iy, y, cols);
                                printf("cf at %08x, accessing %08x (%i bytes before)\n", (int)cf, &cf[offset-cols-1], (offset-cols-1)*sizeof(*cf));
                                cvg = -1;
                                break;
                            };

With that change, the code runs through on Windows and gives the same results as on Linux. I am not sure if that change is sane, or if the problems are just symptoms of other stuff that is happening.

If you are interested in that change (and some other small, include file related changes) for Windows, I'll fork the repo and create a pull request.

-max

DPM Trained Model yields 0% results

Hello,

Firstly, thank you for maintaining this library.

I've been trying to train my own models on the INRIA dataset with dpmcreate. I let it run for 3 days and tested the detector on an intermediate model (Iteration 5.29) and obtained the result 0.0% using the dpmvldtr.

One of the issues I notice from the detection textfile is that there seem to be 0 parts. Here is a sample line:

Test/pos/crop001501.png -23 0 327 22 5.450809 0

Also, I notice multiple detections per image.

Running on the latest version from Github doesn't let me even complete training the model, giving inf values for entropy while initializing parts:

- model->label[0]: 1, model->nr_class: 2, model->nr_feature: 1395
components == 1, skipped coordinate-descent to optimize root mixture model
initializing part filters
 - initializing part filters for model 1(1)
 ---- part 1(8) 6x6 at (2,0), entropy: inf
 ---- part 2(8) 6x6 at (2,21), entropy: inf
 ---- part 3(8) 6x6 at (2,22), entropy: inf
 ---- part 4(8) 6x6 at (2,23), entropy: inf
 ---- part 5(8) 6x6 at (2,24), entropy: inf
 ---- part 6(8) 5x7 at (0,0), entropy: inf
 ---- part 7(8) 5x7 at (5,0), entropy: inf
 ---- part 8(8) 6x6 at (2,2), entropy: 2452796448898994.000000
optimizing root filter & part filters with stochastic gradient descent
 - collecting responses from positive examples : 0%Assertion failed: (k >= 0 && k < ccv_max(db->rows, db->cols) + 1), function ccv_distance_transform, file ccv_numeric.c, line 1128.
Abort trap: 6

Could you please provide some insight into the issue and possible ways of resolving it?

Thanks,

Best,
Chirag

Creating a new classifier

Is it possible to create a new classifier to replace face.js? I am assuming that face.js is a converted version of some haarcascade xml file, yes? Could you point me in the right direction for converting other js/xml files to be used with ccv? Thanks!

swtcreate.c segmentation fault

I am currently trying to reproduce your results for the SWT text detection performance by using bin/swtcreate.c. I run in to a segmentation fault however during the search for std_ratio. Do you have any idea what the issue could be? Also could you publish the parameters used to produce the results here http://libccv.org/doc/doc-swt/?

Update: After testing on my laptop as well as a cluster it appears there is a memory leak somewhere causing an excessive use of memory

Nan and -inf when calling ./dpmcreate

I am currently trying to use dpmcreate to train a single component, no parts, HOG detector baseline, using INRIA training data.

Training seems to go wrong since it reports

 - collecting negative examples -- (100%)             
 - tune model 1 constant for -inf
 - collecting negative examples -- (100%) 
 - tune model 1 constant for nan

Which I suspect to be very wrong.

Full outputs as follows

 ./dpmcreate --positive-list ~/datasets/inria_positives_annotations_fullpath_x_y_width_height.txt --background-list ~/datasets/inria_negatives.txt --negative-count 5000 --model-component 1 --model-part 0 --working-dir ./dpm_cache --symmetric 0
with 1237 positive examples and 5000 negative examples
negative examples are are going to be collected from 1218 background images
use symmetric property? no
use color? yes
negative examples cache size : 2000
1 components and 0 parts
expected 20 root relabels, 10 relabels, 50 data minings and 1000 iterations
include overlap : 0.700000
alpha : 0.010000
alpha decreasing ratio : 0.995000
C : 0.002000
balance ratio : 1.500000
------------------------
global mean: 0.339597, & variance: 0.000022
interclass mean(variance): 0.339597(0.000022)
computing root mixture model dimensions: 5x15
root mixture model initialization corrupted, reboot
 - generating positive examples for model 0 : 1237 / 1237
 - generating negative examples for all models : 5000 / 5000
initializing root mixture model for model 1(1)
 - creating initial model 1 at 5x15
 - converting examples to liblinear format: 6236 / 6237     
 - generated 6236 examples with 2326 dimensions each
 - running liblinear for initial linear SVM model (L2-regularized, L1-loss)
.*
optimization finished, #iter = 11
Objective value = -2.434024
nSV = 1686
 - model->label[0]: 1, model->nr_class: 2, model->nr_feature: 2325
components == 1, skipped coordinate-descent to optimize root mixture model
initializing part filters
 - initializing part filters for model 1(1)
optimizing root filter & part filters with stochastic gradient descent
 - collecting responses from positive examples : 100%  
 - positive examples divided by components : 1192
 - collecting negative examples -- (100%)             
 - tune model 1 constant for -inf
 - collecting negative examples -- (100%) 
 - tune model 1 constant for nan

I stopped the training since -inf and nan indicate that something is very wrong.

Using model-part bigger than 0 generates a segfault.

I am using the stable release of libccv liuliu-ccv-70f8126.

Any idea of what is going on ?

64 bit on osx bin files won't compile.

I am using OSX lion( 10.7.4) on a i7 quad core.
When I go to the lib directory and ./configure and make (choosing clang)
I am able to successfully compile from that make file.
However when I move into the bin directory to compile the c files in that directory this is what follows:

➜ bin git:(unstable) make
make -C ../lib

USE: clang
COMPILE FLAGS: -D HAVE_LIBJPEG
LINK FLAGS: -ljpeg

make[2]: Nothing to be done for `all'.
clang bbffmt.c -o bbffmt.o -c -O3 -Wall -I../lib -D HAVE_LIBJPEG
clang -o bbffmt bbffmt.o -L../lib -lccv -ljpeg -lm
Undefined symbols for architecture x86_64:
"_isnanf", referenced from:
_ccv_any_nan in libccv.a(ccv_util.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bbffmt] Error 1
➜ bin git:(unstable)

I feel like this is just a simple flag issue in the makefile. how do i get it to recognize 64bit ness or will i have to pass a i386 flag?

Thread-local storage is unsupported for iOS

The following occurs when trying to build off the r0.2-rc1 branch in Xcode:

ccv/lib/ccv_memory.c:5:8: error: thread-local storage is unsupported for the current target
static __thread ccv_cache_t ccv_cache;
^

ccv/lib/ccv_memory.c:14:8: error: thread-local storage is unsupported for the current target
static __thread int ccv_cache_opt = 0;
^

Did some digging and found the following post about thread-local storage and iOS. http://stackoverflow.com/questions/6557768/thread-local-storage-and-ios

How do you suggest fixing this one?

MSER documentation

Would it be possible to get some documentation for the ccv_mser function? The inputs and outputs? I know there is msermatch.c but it isn't really that clear.

Converting or training new cascade

The face.js looks like a stage classifier cascade similar to what's used in OpenCV. Is it possible to convert the existing OpenCV Haar or LBP classifiers to your format, and if so, how is it done? Alternatively, do you have a training algorithm for the cascade which can be used as face.js?

Model format convertion

Hi Liuliu,

thanks for the lib it is pretty easy to use for pedestrian detection.
My only problem was the I tried to train the dpm for car detection
and I had a segmentation fault in linear.cpp when train_one
is called by train. I've been trying to find the reason why with
valgrind but unfortunately I had too many errors to be able to
do anything. The thing is that I already have the models train
for cars and other stuff from the matlab implementation and
therefore I was wondering if there was no way to have something
to convert this models or directly use them in your code ?
That would be really useful. Anyway thank for the nice work.
Cheers.

Compiling in Visual Studio

Hi,

I am completely noob about cross compiling and related. I usuallly program in C++ in Visual Studio, but I can't not figure out how to compile this project to be used in Visual Studio. I also made some small projects using gcc.

My first attempt has been to use CMake. No idea where to start lol

After that, I tried to compile with Mingw and MSYS. I just had to change some headers, like alloca.h by malloc.h , unitsd.h by .... I dont remember exactly how, but it compiled. The problem is, now I have some linux-like static library, and I am not able to link it from Visual Studio.

Third attempt was to add the files directly to my Visual Studio c++ project, but too many compiling errors.

Could you give some clues to achieve this? Does this issue have some relationship to another Issue about compiling in win32 using dmake? What is dmake?

Thanks.

ccv_read() raw data with CCV_IO_NO_COPY increases SHA1 compute expense

I noticed that when I run with CCV_IO_NO_COPY things run significantly slower than when I omit the flag. This is strange to me as it seems that all data goes through the ccv_cache_generate_signature() including the SHA1 hash generator. Yet when CCV_IO_NO_COPY is enabled the SHA1 hash takes up significantly more time. I would assume that not copying the data would generally be faster since there isn't a need to allocate and copy the data from one memory location to another but this doesn't seem to be the case. I'm sure I'm missing something but I simply don't see it.

can't build it on MAC

Hi,
I am trying to build and run this on MAC, I was getting this error: thread-local storage not supported for this target

I add this to make file : -pthread -E -dM
so I don't that eroor any more, but when I try to run make file in bin directory , I will get this error:
Undefined symbols for architecture x86_64:
"_ccv_enable_default_cache", referenced from:
_main in swtdetect.o
"_ccv_read_impl", referenced from:
_main in swtdetect.o
"_ccv_array_free", referenced from:
_main in swtdetect.o
_ccv_swt in libccv.a(ccv_swt.o)
_ccv_swt_detect_words in libccv.a(ccv_swt.o)
__ccv_swt_connected_letters in libccv.a(ccv_swt.o)
__ccv_swt_merge_textline in libccv.a(ccv_swt.o)
"_ccv_matrix_free", referenced from:
_main in swtdetect.o
_ccv_swt in libccv.a(ccv_swt.o)
_ccv_swt_detect_words in libccv.a(ccv_swt.o)
"_ccv_drain_cache", referenced from:
_main in swtdetect.o
"_ccv_cache_generate_signature", referenced from:
_ccv_swt in libccv.a(ccv_swt.o)
"_ccv_dense_matrix_renew", referenced from:
_ccv_swt in libccv.a(ccv_swt.o)
"_ccv_canny", referenced from:
_ccv_swt in libccv.a(ccv_swt.o)
"_ccv_close_outline", referenced from:
_ccv_swt in libccv.a(ccv_swt.o)
"_ccv_sobel", referenced from:
_ccv_swt in libccv.a(ccv_swt.o)
"_ccv_array_new", referenced from:
_ccv_swt in libccv.a(ccv_swt.o)
__ccv_swt_connected_component in libccv.a(ccv_swt.o)
_ccv_swt_detect_words in libccv.a(ccv_swt.o)
__ccv_swt_connected_letters in libccv.a(ccv_swt.o)
__ccv_swt_merge_textline in libccv.a(ccv_swt.o)
__ccv_swt_break_words in libccv.a(ccv_swt.o)
"_ccv_zero", referenced from:
_ccv_swt in libccv.a(ccv_swt.o)
"_ccv_array_push", referenced from:
_ccv_swt in libccv.a(ccv_swt.o)
__ccv_swt_connected_component in libccv.a(ccv_swt.o)
_ccv_swt_detect_words in libccv.a(ccv_swt.o)
__ccv_swt_connected_letters in libccv.a(ccv_swt.o)
__ccv_swt_merge_textline in libccv.a(ccv_swt.o)
__ccv_swt_break_words in libccv.a(ccv_swt.o)
"_ccv_contour_new", referenced from:
__ccv_swt_connected_component in libccv.a(ccv_swt.o)
"_ccv_contour_push", referenced from:
__ccv_swt_connected_component in libccv.a(ccv_swt.o)
"_ccv_contour_free", referenced from:
__ccv_swt_connected_component in libccv.a(ccv_swt.o)
__ccv_swt_connected_letters in libccv.a(ccv_swt.o)
"_ccv_resample", referenced from:
_ccv_swt_detect_words in libccv.a(ccv_swt.o)
"_ccv_sample_down", referenced from:
_ccv_swt_detect_words in libccv.a(ccv_swt.o)
"_ccv_array_group", referenced from:
_ccv_swt_detect_words in libccv.a(ccv_swt.o)
__ccv_swt_merge_textline in libccv.a(ccv_swt.o)
"_ccv_array_zero", referenced from:
_ccv_swt_detect_words in libccv.a(ccv_swt.o)
"_ccv_dense_matrix", referenced from:
__ccv_swt_break_words in libccv.a(ccv_swt.o)
"_ccv_otsu", referenced from:
__ccv_swt_break_words in libccv.a(ccv_swt.o)

I just want to run this SWTdetect in command line . Can you please let me know what are steps exactly to make it work.
Thanks!
~Sara

Definition of ICF

You refer to ICF as "integrate channels features" , but I believe it should be "integral channel features" - I was searching everywhere for your definition and couldn't find anything, but then came across research papers for what I think you meant. Let me know if I am correct or not. Thanks!

Codec issue

Thank you, liuliu, for libccv, its awesome. Most of my videos (mp4 for ex, those from my phone, etc) don't seem to run with tld. They only work when I use ffmpeg to extract images and then recreate the video with the default mpeg codec (which of course wreaks havoc to video quality). Any suggestions?

TLD performance

TLD seems to be 3x slower than reported. According to the docs, it should be taking ~100ms per 320x240 frame on an i7-2620M 2.7GHZ; I'm getting ~300-350 on the same CPU with the webcam as input.

The ferns classifiers seem to be taking a disproportionate amount of time. My guess is cache thrashing, but I haven't investigated deeply yet. Oprofile breakdown: https://gist.github.com/4200732

Here's my code in case I'm doing something wrong:
https://github.com/j0sh/thesis/blob/afc6e1ad37b34dcea5bf1f22524a2c2097fe1b39/ccv.c

DPMCreate module seems to be stuck in infinite loop

I am trying to train my own dpm detector using dpmcreate module as mentioned on the http://libccv.org/doc/doc-dpm/

I am using the INRIA dataset, with slightly different positive images(upper body images). The dpmcreate module is running for the last 3 days, but seems to be at the same iteration(as if it is stuck in an infinite loop). All I am seeing for last 3 days is this kind of output(please see attached image):

  • tune model 1 constant for -0.000000
  • collecting negative examples -- (100%)
  • tune model 1 constant for -0.000000
  • collecting negative examples -- (100%)
  • tune model 1 constant for -0.000000
  • collecting negative examples -- (100%)
  • tune model 1 constant for -0.000000
  • collecting negative examples -- (100%)

dpmCreate_stuck_in_infinite_loop

please let me know if i can provide any particular logs/information which might be helpful in understanding the issue better.

image reading issue with bbfdetect stable

bbfdetect ../samples/book.png model_folder

bbfdetect: bbfdetect.c:49: main: Assertion `image != 0' failed.

Am I missing anything related to the included image I/O ?
Btw, I did not compile with GNU GSL, but suppose that shouldn't give me this problem.

Thanks.

How to create a new classifier for the JS implementation?

Hello,

I was reading though your explanation of javascript face detection here: http://liuliu.me/eyes/javascript-face-detection-explained

and i was wondering what you would have to do to also detect the eyes and mouth positions in a face. I assume that you would have to create new classifiers and then pass the portion of the image that has a face into the function with the correct classifier.

My question is, can I create a classifier for your cvv.js using this process and tool?

https://github.com/liuliu/ccv/blob/stable/doc/bbf.md

Thanks and best regards,
Jonathan

Investigate transferable objects and typed arrays

webkitPostMessage() supports transferable objects which are orders of magnitude faster than
structured cloning (regular postMessage()). They're currently supported in Chrome, but could help
speed up perf quite a bit.

http://updates.html5rocks.com/2011/12/Transferable-Objects-Lightning-Fast

Also, Chrome and other browsers now support sending JSON data directly, so if 1.) doesn't work out,
you can get rid of JSON.parse/JSON.stringify in the postMessage calls.

http://updates.html5rocks.com/2011/09/Workers-ArrayBuffer

SWT error ?

I'm having something weird with SWT.

When I input this image:
Imgur

I get this:
Imgur

Would you know why that happens?
(BTW, the Canny edge works fine).

Return hierarchy of information, if requested, from ccv_swt_detect_words()

Currently when ccv_swt_detect_words() is run you get either lines or if specified you get words. It might be nice, if specified to return this information in a hierarchical fashion if requested in the parameters.

  1. Lines bounding boxes
  2. Lines bounding boxes and its associated words bounding boxes.
  3. Lines bounding boxes, its associated words bounding boxes, and for each word its letters bounding boxes.

I think this could be beneficial in some use cases.

Build for iOS

Would you mind giving an example on how to build for iOS? Tried several options and it keeps failing. XCODE or thru terminal. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.