## Archive for the ‘Graphics’ Category

### Stained Glass Algorithm

Image processing doesn’t always have to do with scientific computing. Image processing techniques can easily be applied to create artistic filters capable of producing art that would be impossible or difficult for a human to recreate by hand. Previously, I wrote about an algorithm that can make an image look like an oil painting. In this article, I’ll be discussing an algorithm that can be used to roughly simulate what an image would look like if it were in stained glass. Continue reading ‘Stained Glass Algorithm’ »

### In Memory Image Compression tutorial

In memory image compression is essential for any type of visual computing application. Images alone can take a good amount of memory, and when creating an application which uses many images, you may soon find yourself using several gigabytes of memory. While this may be fine for your personal workstation, it may not be okay if you intend to release your application to the public. To work around this memory consumption problem, you’ll want to use in-memory image compression techniques to reduce your program’s memory footprint. Continue reading ‘In Memory Image Compression tutorial’ »

### Coding Bilinear Interpolation

When performing image transformation and manipulation techniques, it is often necessary to employ some sort of interpolation or filtering in order to obtain a good image quality. For example, if you scale an image, you can determine the final color of each pixel by either some basic nearest neighbor method, or a more advanced interpolation method. However, an interpolation method will invariably offer better final image quality. In this tutorial, we’ll be writing a function to rotate an image, using bilinear interpolation. This tutorial also demonstrates how to perform a high quality image rotate transformation, however, that is not the focus of this tutorial, but rather the example transform being performed. Continue reading ‘Coding Bilinear Interpolation’ »

### Advanced Image Processing with SSE

In a previous article about image processing with SSE, we used some basic SSE intrinsics to perform a very easy image manipulation routine, removing all blue from an image. This task was easy, since each pixel was 8 bits per component, with 4 components (ARGB). However, for more advanced image processing functions such as 2D convolution, it is preferable to work with each color component as a 32-bit floating point number rather than an 8-bit unsigned integer. Continue reading ‘Advanced Image Processing with SSE’ »

### Advanced Image Processing with CUDA

In the previous tutorial, intro to image processing with CUDA, we examined how easy it is to port simple image processing functions over to CUDA. In this tutorial, we’ll be going over a substantially more complex algorithm, and how to port it to CUDA with incredible ease. Continue reading ‘Advanced Image Processing with CUDA’ »

### Intro to image processing with CUDA

CUDA is great for any compute intensive task, and that includes image processing. In this tutorial, we’ll be going over why CUDA is ideal for image processing, and how easy it is to port normal c++ code to CUDA. Continue reading ‘Intro to image processing with CUDA’ »

### Image twist and swirl algorithm

Image warps and other distortions are significantly more complicated than simple image processing techniques such as convolution. This tutorial will cover how to twist an image in the center. This exact code can be modified to do twists or other types of image warps. Continue reading ‘Image twist and swirl algorithm’ »

### Image Processing with SSE

Using SSE to process images or video is essential to achieving good performance. Most popular multimedia applications use SSE to greatly accelerate application performance. Unfortunately, like everything in life, if SSE is used incorrectly it can actually perform worse than non-SSE code. This article will take you through some code and discuss the performance of each. Continue reading ‘Image Processing with SSE’ »

### Oil Painting Algorithm

Taking an image and making it look like an oil painting is not only visually impressive, but also easy, from an algorithmic point of view. This page will show you how to write code to achieve the oil painting effect.

## Continue reading ‘Oil Painting Algorithm’ »

### Image Convolution with GDI+

Image convolution is the most vital image processing algorithm available. Using simple 2-D convolution, you can blur, sharpen, emboss, and even detect edges in an image. Not only is convolution so powerful, but it is also very easy to perform. Simply put, the value of a modified pixel is determined solely by it’s original value summed up with weighted values of it’s neighboring pixels. After the weighted sum is completed, a division takes place to normalize the value of the pixel, usually so that the brightness of the image remains the same. Sometimes, an offset can be added after the normalization for certain effects. Continue reading ‘Image Convolution with GDI+’ »