Computer Vision in ArrayFire – Part 2: Feature Description and Matching

Peter EntschevArrayFire, Benchmarks, Computer Vision 2 Comments

In the Part 1 of this series, we talked about upcoming feature detection algorithms in ArrayFire library. In this post we show case some of the preliminary results of Feature Description and matching that are under development in the ArrayFire library. Feature description is done using the ORB feature descriptor[1]. The descriptors are matched against a database of features using Hamming distance as the metric. The results we show in this blog use the same hardware and software used in the previous blog: Intel Sandy Bridge Xeon processor with 32 cores (for baseline OpenCV CPU implementation) NVIDIA Tesla K20C (for OpenCV and ArrayFire CUDA implementations) ArrayFire development version OpenCV version 2.4.9 Feature Description and Matching Benchmarks In Part 1 we showed that …

ArrayFire: Write once, Run anywhere

Shehzan MohammedArrayFire 2 Comments

One of ArrayFire’s biggest features is the ability for code to be written just once and run on a plethora of devices. In this post, we show the outputs of af::info() from various devices available to us. Desktop Processors AMD GPU/CPU (OpenCL) ArrayFire v2.1 (OpenCL, 64-bit Linux, build 4b9115c) License: Standalone (/home/pavan/.arrayfire.lic) Addons: MGL4, DLA, SLA Platform: AMD Accelerated Parallel Processing, Driver: 1526.3 (VM) [0]: Tahiti, 2864 MB, OpenCL Version: 1.2 1 : AMD FX(tm)-8350 Eight-Core Processor, 7953 MB, OpenCL Version: 1.2 Compute Device: [0] AMD APU (OpenCL) ArrayFire v2.1 (OpenCL, 64-bit Linux, build 586ef59) License: Standalone (/home/arrayfire/.arrayfire.lic) Addons: MGL4, DLA, SLA Platform: AMD Accelerated Parallel Processing, Driver: 1445.5 (VM) [0]: Spectre, 624 MB, OpenCL Version: 1.2 1 : AMD …

ArrayFire Capability Update – July 2014

Oded GreenAndroid, ArrayFire, C/C++, CUDA, Fortran, Java, OpenCL, R 1 Comment

In response to user requests for additional ArrayFire capabilities, we have decided to extend the library to have CPU fall back when OpenCL drivers for CPUs are not available. This means that ArrayFire code will be portable to both devices that have OpenCL setup and devices without it. This is done through the creation of additional backends. This will allow ArrayFire users to write their code once and have it run on multiple systems. We currently support the following systems and architectures: NVIDIA GPUs (Tesla, Fermi, and Kepler) AMD’s GPUs, CPUs and APUs Intel’s CPUs, GPUs and Xeon Phi Co-Processor Mobile and Embedded devices As part of this update process we are also looking at extending ArrayFire capabilities to low power systems such …

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, …

Remote Off-Screen Rendering with OpenGL

Shehzan MohammedArrayFire, OpenGL 18 Comments

At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display. In this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display. A few notes before we get started. This blog is limited to computers running distributions of Linux. The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display). AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices. Requirements You will need access to the remote …

OpenCL on Mobile Devices

Pavan YalamanchiliAndroid, OpenCL 6 Comments

While Google has openly displayed its opposition to OpenCL, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante support OpenCL on their GPUs. Android Phone manufacturers – Samsung, HTC, Sony and Amazon – ship OpenCL drivers and libraries on their latest generation of devices. Considering the prevalence of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend. To consolidate a list of OpenCL supported Android devices, we created a publicly accessable Google document seen below. If you have an Android phone that is not listed, we’d appreciate it if you contributed to the list. To test if OpenCL is supported on your phone, you can use OpenCL Info …

ArrayFire on Tegra K1

Shehzan MohammedArrayFire 2 Comments

We’re pleased to announce the arrival of ArrayFire for NVIDIA Tegra K1! This version of ArrayFire comes with all the capabilities and features of our standard version of ArrayFire. It includes all ArrayFire CUDA functionality—with the exception of linear algebra support—as well as fully operational graphics support. ArrayFire for Tegra currently works with Tegra K1 processors running Linux for Tegra. We invite and encourage you to test it out on your boards and give us feedback; any bug fixes or performance improvements will be promptly resolved, as this is a separate branch of ArrayFire. If you’d like to deploy ArrayFire on Android, feel free to contact us for further support. We are open to partnering with anyone wishing to deploy ArrayFire in other …

Indexing with ArrayFire

Umar ArshadArrayFire Leave a Comment

ArrayFire is a fantastic library when it comes to performance. One of the things that people overlook when looking into ArrayFire is it’s powerful indexing capabilities. The main data structure in the ArrayFire library is the array. The array stores the data in a column major order. This means that the following code: float a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; array A(3, 3, a); Will produce the following matrix: Notice how the first three values of the a array make up the first column of A. When you want to perform an operation on every element of the array you can just use the variable name with the operation. The following command adds 5 to …

Computer Vision in ArrayFire – Part 1: Feature Detection

Peter EntschevArrayFire, Computer Vision 6 Comments

A few weeks ago we wrote Writing a Simple Corner Detector with ArrayFire. In that post, we discussed a little bit about the new features that we are working on for ArrayFire. Some of these new computer vision features will be available in the next release of ArrayFire. For the next release, ArrayFire will have a complete set to start with feature tracking, including FAST for feature detection [1], ORB for description [2] and a Hamming distance matcher. We will also include a dedicated version of the Harris corner detector [3], even though it can be written using existing ArrayFire functions. This implementation is straightforward, easy to use and will have better performance. For this post, we will share some …

Image Processing Benchmarks on NVIDIA Jetson TK1

Pradeep GarigipatiArrayFire, Benchmarks, CUDA 7 Comments

In this post we will be looking at benchmarks of the following ArrayFire image processing functions on an ARM device. Erosion/Dilation Median filter Resize Histogram Bilateral filter Convolution We pitted the brand new compute 3.2 GPU on NVIDIA Jetson TK1 against a mobile NVIDIA GPU. The closest match to the GPU (from here on referred as TK1) on the Jetson board we have in our mobile card deck is a NVIDIA GT 650M. The GPU device properties that have critical effect on the function performance are listed below. Property Name / Device Name Jetson TK1 GK20A GT 650M Compute 3.2 3.0 Number of multiprocessors 1 2 Cores 192 384 Base clock rate 852 MHz 950 MHz Total global memory 1746 …