Comparison performed using CUDA toolkit version 9.1 and CUVI release 1.55 on an underlying core i3-6100, GTX 1080 system and benched with NVIDIA Nsight.

CUVI and NPP both have been in market for almost a decade now. NVIDIA’s own performance primitive library (NPP), which started as a CUDA-alternative to IPP, now has hundreds of functions over its decade long releases. These functions provide a quick way to prototype applications on massively parallel GPUs without much of a learning curve. CUVI (CUda Vision and Imaging) SDK, on the other hand, with its limited functionality, provides the most cutting edge computer vision solutions and offers production quality verticals for various domains.

In this post, I will be comparing one of CUVI’s most popular feature; debayer with its counterpart in NPP. It’s fair to mention that NPP’s debayer offers only bi-linear approach: “Missing pixel colors are generated using bi-linear interpolation with chroma correlation of generated green values“. This is the most basic approach to regenerate a colored image from CFA and is prone to artifacts at high feature regions. For a much better regeneration, CUVI offers the newer, much improved DFPD approach to debayering.

Earlier we demonstrated CUVI’s new underwater filter that works like a magic in clarifying and restoring the colors of underwater imagery. Today, I’m going to reveal what it does to underwater videos – most of which are shot using GoPro. You’ll find link to each of the original video to better compare the effectiveness of the filter:

GoPro on Hammerhead Fin

Original Video Link

This page is a showcase of our new underwater filter that removes haze and brings out the real colors to your underwater photography. All the results are generated from ‘Auto’ setting of the filter. Although Auto mode works on most of the images like magic, the filter is heavily parameter-ized to fine tune the results.


Apart from removing haze, it also enhances the colors of haze-less images and is so addicve that you start using it on every underwater photo by default. Feel free to comment your thoughts below and contact us if you’re interested in purchasing this feature.

We, humans have poor visibility in darkness and have always fantasized to have technology that enables us to see better in low light. When it comes to natural vision, our eyes are weak and any color captured by camera in its lower intensity appears black to us and hence the complete image is unrecognizable.

Today we present a feature of CUVI that enhances the low intensity colors in a dark photo taken from a general purpose mobile, CCTV or DSLR camera.


It was just another day at work for Brent, scanning the floor of the ocean off the coast of Florida, whose company Queens Jewels LLC owns “salvaging rights” to 1715 fleet, a group of 11 Spanish ships which sank somewhere off the shore of Florida.

And then Brent stuck gold, literally. He has unearthed jewels from one of the sunken ships, gold coins to be precise, which are worth over 1 million dollars in value.

Undersea imagery is awesome. It shows us the parallel world of creatures, coral reefs and whatnot which covers about 75% of our planet Earth. There are a plethora of cameras which record and stream underwater videos and images, ranging from analog cameras which are still widely used in commercial diving to HD and even 2K cameras streaming digital undersea video. However, water is different in the way it scatters light and visibility as a diver or an ROV goes further down. The visibility and the colors we see in undersea imagery are very sensitive to the depth as well as the equipment used. Most cameras do not have any “undersea filter” which can clean up your awesome scuba dive or in the case of commercial diving, you may miss visual details of important underwater infrastructure you were trying to inspect.

We heard and we responded. One dominant request we got from our users was to be able to quickly test out the library without setting it up first, since sometimes, they ran into issues due to machine incompatibility. Today, we announce the release of a live CUVI demo page where you can quickly try out most common functions of CUVI GPU Imaging SDK without downloading or installing anything.

This saves you hours you would have otherwise spent on installing and configuring CUVI to try out simple functions from our Color Operations module, for example.

The demo runs on a beefy virtual server on the Cloud with NVIDIA Grid K520 which is a pretty decent card to test performance of different CUVI functions. What you should note though, is that the performance on your own machine with a similar capability NVIDIA CUDA enabled card would be a bit more, since the demo runs on virtualized hardware, not dedicated bare metal silicon.

NVIDIA has planned to drop the support for GPUs with Tesla architecture (compute capability 1.x) in upcoming releases of CUDA Toolkit. In fact, GPUs with compute capability 1.0 have already been removed as a target device from CUDA Toolkit 6.5, released in August 2014. With toolkit 6.5, you can no longer specify compute_10, sm_10 for the code generation. Not only this, NIVIDIA has also removed the CC 1.0 from the comparison tables in the Programming Guide 6.5

The default architecture has been changed to compute_20, sm_20 in the rules file of CUDA Toolkit 6.5. As for the rest of Tesla architectures, i.e. CC 1.1, 1.2 and 1.3, they are still supported as a target, but are marked as deprecated. The following warning is generated by the compiler if we attempt to compile the code for Tesla architecture with CUDA 6.5:

CUDACOMPILE : nvcc warning : The ‘compute_11′, ‘compute_12′, ‘compute_13′, ‘sm_11′, ‘sm_12′, and ‘sm_13′ architectures are deprecated, and may be removed in a future release.

Since its first release back in year 2007 with compute capability 1.0, CUDA has three more architectural releases and eight more compute capabilities which marks the fact that it’s an ever evolving architecture. Although CUDA is forward compatible but every new release comes with its own new features worth using and an increased thread/memory support. As a rule of thumb every new architecture runs the CUDA code faster than previous generation given both cards have same number of cores.

The comparison below gives a list of feature/functionality support between compute capabilities of NVIDIA’s CUDA enabled devices. Note that atomic operations weren’t supported in the first release and since they are so important, NVIDIA now practically compares architectures from 1.1 and later.

Continuing the legacy to provide the best imaging algorithm at lightning fast speed, we are proud to announce the addition of DFPD debayer algorithm in CUVI which is more robust than the existing demosaic and shows no artifacts at high feature areas. The previous implementation of demosaic algorithm (which uses bilinear interpolation) is super fast giving a throughput of more than 500 fps on full HD image on a common GPU yet it has its downside.

Since color planes have severe aliasing, a simple interpolation (or HQ bilinear interpolation for that matter) of the individual planes has little effect in removing the artifacts that appear at high feature regions. Hence we need a a better reconstruction approach:


Not only the new algorithm removes artifacts at high-feature regions, the colors get more natural and crisp. This is due to the fact that DFPD (directional filtering with posteriori decision) algorithm better estimates the green plane taking into account the natural edges of the image and then reconstruct the missing red/blue pixels based on that reconstructed green image instead of calculating all values directly.

This huge improvement over the existing implementation comes at a price: more computational cost. The DFPD algorithm is almost half as slow as the previous one, however, it still gives a whopping 263 fps on a full HD image. Note this time excludes the memory transfers. And as always as in CUVI you can use this GPU accelerated DFPD debayer with just three lines of code:

CuviImage input("D:/bayer.tif", CUVI_LOAD_IMAGE_GRAYSCALE_KEEP_DEPTH), output;

cuvi::colorOperations::demosaic_DFPD(input, output, CUVI_BAYER_RGGB);

cuvi::io::saveImage(output, "D:/debayered.png");

There’s an additional refinement step (optional) that comes with DFPD to further refine the pixels values and cut down the unnatural high frequencies. By default, it’s set to false but you can enable it with a flag:

// Further refine the results
cuvi::colorOperations::demosaic_DFPD(input, output, CUVI_BAYER_RGGB, true);

Download the latest cuvi from here or get more information on the features at our wiki.