hughperkins / DeepCL

OpenCL library to train deep convolutional neural networks
Mozilla Public License 2.0
866 stars 200 forks source link

Requesting PNG support #96

Closed merceyz closed 7 years ago

merceyz commented 8 years ago

As per your request i'm opening a issue to request PNG support

hughperkins commented 8 years ago

There's already some code to write pngs, ie:

https://github.com/hughperkins/DeepCL/blob/master/src/util/ImagePng.h

libpng is currently in the 'maintainers options': https://github.com/hughperkins/DeepCL/blob/master/CMakeLists.txt#L26

if(MAINTAINER_OPTIONS)
    OPTION(BUILD_PYTHON_WRAPPERS "Build python wrappers.  Maintainers only." OFF.)
    OPTION(DEV_RUN_COG "DeepCL maintainers only, otherwise set to 'OFF'." OFF)
    OPTION(PROTOTYPING "Only for devs." OFF)
#    mark_as_advanced(FORCE PROTOTYPING)
    OPTION(LIBPNGPP_AVAILABLE "Some toys/samples only." OFF)
#    mark_as_advanced(FORCE LIBPNGPP_AVAILABLE)
else()

...but could be moved into the standard options list.

I dont have time to add this right now. Perhaps this is something you could take a look at?

merceyz commented 8 years ago

I enabled the maintainers options, then the png box. It threw an error that it could not locate the files for it. It gave me no option to say where they are, which it does with jpeg.

I need a guide on how to:

  1. Build deepcl with png
  2. Load image from a byte array, not a file
  3. Get the RGB values of a pixel
merceyz commented 7 years ago

I ended up doing the same as i did in #85, do all the work in c# then just overwrite the memory of deepcl

hughperkins commented 7 years ago

Cool :-)