Closed marrrcin closed 5 years ago
Your configuration looks right. The most important thing is: -D HAVE_LIBJPEG -D HAVE_LIBPNG
macro, this tells ccv to have libjpeg / libpng code enabled. LDFLAGS looks good as well.
Are you on unstable
branch? unstable
branch diverged a lot due to new work in libnnc. It could be CCV_IO_GRAY
code path is less tested than CCV_IO_RGB_COLOR
.
It also could simply be the file img.jpeg
is not accessible for the program, you can check the returned value for that (if it is CCV_IO_ERROR
, it is not accessible).
Overall, I think the root cause could be you don't have access to the file (if it is indeed you compile with the said config.mk file). I checked the code again, even on unstable
branch, CCV_IO_GRAY
would at least allocate the image matrix for you.
Ubuntu 18.04 is a pretty standard configuration I had (the same with 16.04), the CI pipeline covers it: https://ci.libccv.org/waterfall / https://github.com/liuliu/ccv/blob/unstable/.travis.yml
Thanks for a quick reply!
OK, so when I've installed all of the packages you have listed in .travis.yml
it started to work.
Hi @liuliu , I'm struggling with installation of your library. I've tested it on clean VMs with:
and on each one of them result is the same - running the following code:
compiled with:
and run:
ends up with:
Reason is that:
ccv_read(argv[1], &image, CCV_IO_GRAY | CCV_IO_ANY_FILE);
results inimage
pointer still being0
instead of allocated image.So my belief is that there is a missing piece of documentation that explains how to configure something more before the compilation. I have
libjpeg
andlibpng
installed. What are the prerequisites for the installation?FYI, my
config.mk
: