Image editing using ArrayFire: Part 3

Pradeep GarigipatiArrayFire, C/C++, CUDA, Image Processing, OpenCL 1 Comment

Today, we will be doing the third post in our series Image editing using ArrayFire. References to old posts are available below. * Part 1 * Part 2 In this post, we will be looking at the following operations. Image Histogram Simple Binary Theshold Otsu Threshold Iterative Threshold Adaptive Binary Threshold Emboss Filter Today’s post will be mostly dominated by different types of threshold operations we can achieve using ArrayFire. Image Histogram We have a built-in function in ArrayFire that creates a histogram. The input image was converted to gray scale before histogram calculation as our histogram implementation works for vector and 2D matrices only. In case, you need histogram for all three channels of a color image, you can …

Image editing using ArrayFire: Part 2

Pradeep GarigipatiArrayFire, Image Processing 10 Comments

A couple of weeks back, we did a post on a few image editing functions using ArrayFire library. Today, we shall be doing the second post in the series Image Editing using ArrayFire. We will be looking at the following operations today. Image distortion Noise addition Noise reduction Edge filters Boundary extraction Difference of gaussians Code and sample input/outputs corresponding to each operation are described below. Image distortion We will be looking at spread and pick filters in this section. Both of these filters are fundamentally the same, they replace each pixel in the original image with one of it’s neighboring pixels. How the neighbor is chosen is essentially the difference between spread and pick. Both of these functions use …

Image editing using ArrayFire

Pradeep GarigipatiArrayFire, Image Processing 2 Comments

In this post, we will be looking at the following simple image editing operations using the ArrayFire library. contrast modification brightness modification translation digital zoom alpha blending unsharp mask Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections. All the operations are built using some existing image manipulation functions and the awesome element-wise operations in ArrayFire. Contrast modification /** * contrast value should be in the range [-1,1] **/ void changeContrast(array &in, const float contrast) { float scale = tan((contrast+1)*Pi/4); in = ((in/255.0f – 0.5f) * scale + 0.5f) * 255.0f; } Brightness modification /** * brightness value should be in the range [0,1] **/ void changeBrightness(array &in, const float brightness, …

ArrayFire Examples (Part 4 of 8) – Image Processing

ArrayFireArrayFire, CUDA Leave a Comment

This is the fourth in a series of posts looking at our current ArrayFire examples. The code can be compiled and run from arrayfire/examples/ when you download and install the ArrayFire library. Today we will discuss the examples found in the image_processing/ directory. In these examples, my machine has the following configuration: ArrayFire v1.9 (build XXXXXXX) by AccelerEyes (64-bit Windows) License: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX CUDA toolkit 5.0, driver 306.94 GPU0 GeForce GT 650M, 2048 MB, Compute 3.0 (single,double) Display Device: GPU0 GeForce GT 650M Memory Usage: 1981 MB free (2048 MB total)… Image Demo The purpose of this example is to show how to do some common image manipulations. The method channel_split shows how easily multi-dimensional arrays can be subdivided: // Split a MxNx3 image into 3 separate channel …

GTC 2013 Tutorial – CUDA Accelerated Image Processing Libraries

John MelonakosArrayFire, CUDA, Events Leave a Comment

The 2013 GPU Technology Conference is just two weeks away. We’re super excited. We’re spending a lot of time preparing for our tutorial on CUDA Accelerated Image Processing Libraries. We think it will be well worth your while to attend. This is an 80-minute share all about CUDA image processing from James Malcolm, an AccelerEyes co-founder and lead engineer. You will walk away from the tutorial much better prepared to build fast computer vision and image processing codes. The session abstract is as follows: Image processing has consistently proven to benefit greatly from GPU acceleration. A number of libraries available from NVIDIA and AccelerEyes make image processing development efficient and lead to big speedups. Using these libraries can often significantly shorten …

Image Processing with ArrayFire and OpenCV on the GPU

John MelonakosArrayFire, C/C++, Case Studies, CUDA Leave a Comment

ArrayFire is a great way to supplement OpenCV for faster processing on the GPU. Mcclanahoochie recently posted an interactive demo showing the use of OpenCV with ArrayFire for computing Local Contrast Enhancement on the GPU from webcam video. Mcclanahoochie also shows how easy it is to convert OpenCV Mat images into ArrayFire GPU array images, as seen in the code snippit below: All the source code is available on Google Code, linked to from his website. Simply download ArrayFire and OpenCV and try it out for yourself!