Image Processing
Here is a collection of techniques for altering images in various ways, sampled from work for my Digital Image class.
The processes were implemented using C#.
(The source images used are not my own, except for those in the Curves section)
Seam Carving
Seam carving is a process by which an image can be resized by removing 'seams' of pixels that have the least effect on the content of the image. These are determined by analyzing the 'energy' of a pixel, or how drastic the change is between the pixels to its left and right. This is evaluated along the entire height of the image, for each pixel across the width of the image, and the seam of least total pixel energy is chosen as the next to be removed.
Visualization of the seams of pixels removed from the original image to reduce the width from 435 pixels to 350 pixels.
The color of each seam denotes the order in which it was chosen, where red is first and violet is last.
Image Stitching
The same technique of finding seams in an image can be applied to compositing two images together. Given an overlapping region of two images, the lowest-energy seam in the region will be the least noticeable boundary between them along which they can be 'stitched' together to produce a single composite image.
The two images being stitched together
Shown above is a visualization of the overlapped region, the chosen seam, and the stitched result
Floyd-Steinberg Dithering
NOTE: You may have to open the image in its own tab to properly see the dithering, as browsers perform their own dithering on images at reduced sizes.
2 shades
6 shades
2 colors per channel
6 colors per channel
Ordered-Kernel Dithering
NOTE: You may have to open the image in its own tab to properly see the dithering, as browsers perform their own dithering on images at reduced sizes.
4x4 kernel
6x6 kernel
5x5 kernel
6x6 kernel
Curve Editor
A piecewise-linear curve (starting at (0,0) and ending at (1,1)) can be used to transform the colors of an image. The below series of images demonstrates how the curve can be used to manipulate the relationships of the colors.