need a simple example of using CUDPP_COMPRESS

50 views
Skip to first unread message

Fatema Zohora

unread,
Dec 22, 2016, 3:51:54 PM12/22/16
to CUDPP
Hello Everyone,

I am a beginner in CUDPP. I have gone through the simple CUDPP example (http://cudpp.github.io/cudpp/2.3/example_simple_c_u_d_p_p.html). But I need to use CUDPP_COMPRESS algorithm to compress image. So I have confusion about the CUDPPConfiguration that I have to set for compression. Could anyone please provide me a simple example to open image in host, transfer that image from host to device, do the compression and finally get the result back from device to host.

(I basically need to find normalized compression distance between two images, so fetching just the compressed size is enough for me)

Thanks.

John Owens

unread,
Dec 22, 2016, 3:57:51 PM12/22/16
to CUDPP

Is there a particularly good reason to use CUDPP's compression for an image? Almost certainly you would prefer to use a more traditional image-compression method (jpg, png, etc.). There has historically been a CUDA sample "7_CUDALibrariess/jpegNPP - new CUDA sample that demonstrates how to use NPP for JPEG compression on the GPU".


JDO

Fatema Zohora

unread,
Dec 22, 2016, 6:18:08 PM12/22/16
to CUDPP
As far as I know, CUDPP's compression use bzip2-like lossless data compression. I was looking for lossless data compression thats why thought of this. But I would also have a look at "7_CUDALibrariess/jpegNPP". Thank you for the suggestion.

John Owens

unread,
Dec 22, 2016, 6:22:06 PM12/22/16
to cu...@googlegroups.com
Lossy compression on images gives much much better compression ratios and is designed in an image-specific way so that it has minimal visual impact. Unless there is a really good reason why you need lossless compression, lossy compression is likely a better approach for nearly all applications.

JDO
> --
> You received this message because you are subscribed to the Google Groups "CUDPP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cudpp+un...@googlegroups.com.
> To post to this group, send email to cu...@googlegroups.com.
> Visit this group at https://groups.google.com/group/cudpp.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages