image Enhancement Digital Image Processing

Post on 18-Apr-2015

95 Views

Category:

Documents

10 Downloads

Preview:

Click to see full reader

Transcript

IMAGE ENHANCEMENT USING DIGITAL IMAGE PROCESSING

SUBMITTED BY-B . T E C H 4 T H Y R

INTRODUCTION

The project named “IMAGE ENHANCEMENT SOFTWARE USING DIGITAL IMAGE PROCESSING” aims at converting the colored image into a free hand drawing image.

Java language has been chosen for implementation because of its features of platform independent, secure and robust.

The project is mainly divided into 3 modules:

The set of operations consists of the following –

1. Brightness2. Sharpen and Blurring

3. Negative4. Grayscale conversion

5. Rotate

BASIC OPERATIONS TO BE PERFORMED ON IMAGES

Brightness

This operation increases the brightness level or gray scale of the image pixels by multiplying them by a multiplying factor which is 1.5(user –adjustable ).

For this following are used:-

Class RescaleOp – performs a pixel-by-pixel rescaling The scaled sample values are clipped to the minimum/maximum

representable in the destination image.

filter method – Rescales the source BufferedImage If the color model in the source image is not the same as

that in the destination image, the pixels will be converted in the destination.

If the destination image is null, a BufferedImage will be created with the source ColorModel.

Original image After brightening

Sharpen and Blurring

Sharpening enhances the edges and corners in the image and blurring is the inverse of it.

The blur and sharpen filter is a subclass of Convolver.The abstract class Convolver handles the basics of a convolution filter by implementing the ImageConsumer interface to move the source pixels into an array.

It also creates a second array for the filtered data. Convolution filters sample a small rectangle of

pixels around each pixel in an image, called the convolution kernel.

-

Sharpening contains corresponding output pixel has the difference between the centre pixel and the surrounding average added to it.

In blurring we simply takes average of all pixel values in mask.

-1 -1 -1

-1 9 -1

-1 -1 -1

1/9 1/9 1/9

1/9 1/9 1/9

1/9 1/9 1/9

Original image Sharpened image

Original image Blurred image

Negative

It takes apart the red, green, and blue

channels and then inverts them by subtracting them from 255

It uses ShortLookupTable properties which contains data array.

If there is only one array in the lookup table, it will be applied to all bands. All arrays must be the same size.

Original image Negative image

Grayscale conversion

Class ColorSpace This abstract class is used to serve as a color

space tag to identify the specific color space of a Color object.It contains methods that transform colors in a specific color space

Class ColorConvertOp This class performs a pixel-by-pixel color

conversion of the data in the source image.  Color conversion can be specified via an array of ColorSpace objects.

Original image Grayscale image

Rotate

We can rotate the image by applying affine transformation on image received through affine transformation and getGraphics(). In varied angles around the centre pixel on image.

Original imageRotated image

Pencil Effect on the image

To achieve the desired visual effects of an actual pencil sketch, we propose four-step method for colored image

sharpening gradient estimation

gradient transform smoothing

Sharpening Sharpening enhances the edges and corners

in the image. So it helps to detect every edges and corners in the image completely.

Gradient estimation

The next task is to detect points of significant gradient ( edges and corners).

Edge detection is also a subclass of convolver. It also implements convolution using different kernals.

we have discussed some edge detector kernals –

Sobel operator Prewitt’s operator Laplacian operator

Sobel Operator The operator consists of a pair of 3×3

convolution kernels as shown in Figure 1. One kernel is simply the other rotated by 90°.

Prewitt’s operator: Prewitt operator is similar to the Sobel

operator and is used for detecting vertical and horizontal edges in images.

The Laplacian operator produces both positive gradient and negative gradient, to roughly detect the edge, we can simply keep either of the two gradients (a more accurate way is to detect the zero-crossing).

To achieve the objective of linking darker pencil color to edges of larger gradient, we apply the following transform,

where t is an empirically-chosen parameter, which can be user-adjustable.

final smoothing the thresholding step may make the difference

between the contours and the background too abrupt.we adopt smoothing step to further blend the contours with the background and to link the broken contours.

Result after implementing pencil effect using sobel operator

After Prewitt’s operator

After Laplacian operator

Emboss Effect

conventional embossing method, the embossed image has similar results in both the gray scale image and the color image. Mask for embossing effect are following-

The selection of an embossing mask is dependent on the direction of the lighting such as 45, 90, or 135 degrees.

-

We are using mask with center value 1. this mask will maintain the color of the image

6 0 0 0 1 0

0 0 -6

convolution is implemented using embossing kernal.. This allows the output pixel to be affected by the immediate neighborhood in a way that can mathematically specified with a kernel.

Emboss effect snapshot

References

• A New Embossing Method for Color Images Ji-Hong Kim,Kwang-Eui Lee, Ki-Ryong Kwon

• AUTOMATIC GENERATION OF PENCIL-SKETCH LIKE DRAWINGS FROM PERSONAL PHOTOS Jin Zhou and Baoxin Li

• http://www.itgalary.com

• http://docs.oracle.com

Thank you

top related