Project Overview
What is the Image Modification Tool?
The idea for the image modification tool is to create a tool with a variety of different features and give the ability to have features build on one another. This image modification tool implements five features and the option to apply these features in any random order.

- Tint
- Glow
- Oil Paint
- Fisheye Lens
- Hybrid Image
Approach
Tint -
- Takes as input from the user three color values R, G, B.
- Divides each input color value by 100.
- Takes the product of the results found in the previous step and its corresponding color channel.
Glow -
- Coverts the input image to gray scale.
- Computes the images gradient.
- Takes the product of the original color image and 0.5.
- Computes the product of the image gradient and the result found in the previous step.
Oil Paint - Examines sub-pixels within a certain radius, categories each pixels intensity, and keeps a count of the number of sub-pixels with each intensity. This allows the final pixels value to be determined by the intensity bin with the most pixels.
Step 1:
- For each pixel, calculate the intensity of the pixels within the radius of the current pixel.
- Increment the count for each intensity bin that the number falls into.
- Maintain the total red, green, and blue values for each bin.
Step 2:
- For each pixel, determine which intensity bin has the most number of pixels in it. (Finds the maximum level of intensity.)
Step 3:
- Take the total red, green, and blue values from the bin chosen in Step 2, and divide by the total number of pixels in that bin.
Source: http://supercomputingblog.com/graphics/oil-painting-algorithm/
Fisheye Lens - The Fisheye lens warps a standard image into an image that appears to have been taken with a fisheye lens. The transformation pushes points away from the center of the image relative to their distance from the center. The distortion can be approximated by a Taylor expansion, and in this case the first order expansion works the best because it is the simplest to work with while still providing distortion. The transformation goes pixel-by-pixel and converts the coordinates from their pixels location to a [-1, 1] range and then are translated from Cartesian to Polar coordinates and their new position is found. The reason for this is that polar coordinates can have their distance from the origin changed without changing the angle from the x-axis.
Source: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.136.3745&rep=rep1&type=pdf
Hybrid Image - Apply a Gaussian filter with low-frequency to input image one and a high-frequency filter to input image two. To obtain the high-frequency image you take the difference between the original image and the low-frequency filtered image. Using the formula I = I1*G + I2*(1 - G) a hybrid image is then obtained by summing the low-frequency and high-frequency images together. The low-frequency image will be seen at further distances and the high-frequency image will be seen up close. This implementation uses a Gaussian filter size of 256 x 256 and allows you to choose the sigma value. For colored images the filter needs to be applied to each color channel then stacked together for the colored final result. An improvement to this implementation of hybrid images allows you to select two points of interest on each input image and re-aligns based on the selected points. This is especially useful when trying to generate a hybrid image with two face images and aligning the eyes.
Source: http://www.cs.princeton.edu/~andyz/ip/proj3/
http://cvcl.mit.edu/publications/OlivaTorralb_Hybrid_Siggraph06.pdf