Top Banner
IMAGE ENHANCEMENT USING DIGITAL IMAGE PROCESSING SUBMITTED BY- B.TECH 4 TH YR
32

image Enhancement Digital Image Processing

Apr 18, 2015

Download

Documents

gsingh_424556
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: image Enhancement Digital Image Processing

IMAGE ENHANCEMENT USING DIGITAL IMAGE PROCESSING

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

Page 2: image Enhancement Digital Image Processing

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:

Page 3: image Enhancement Digital Image Processing

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

Page 4: image Enhancement Digital Image Processing

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.

Page 5: image Enhancement Digital Image Processing

Original image After brightening

Page 6: image Enhancement Digital Image Processing

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.

Page 7: image Enhancement Digital Image Processing

-

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

Page 8: image Enhancement Digital Image Processing

Original image Sharpened image

Page 9: image Enhancement Digital Image Processing

Original image Blurred image

Page 10: image Enhancement Digital Image Processing

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.

Page 11: image Enhancement Digital Image Processing

Original image Negative image

Page 12: image Enhancement Digital Image Processing

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.

Page 13: image Enhancement Digital Image Processing

Original image Grayscale image

Page 14: image Enhancement Digital Image Processing

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.

Page 15: image Enhancement Digital Image Processing

Original imageRotated image

Page 16: image Enhancement Digital Image Processing

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

Page 17: image Enhancement Digital Image Processing

Sharpening Sharpening enhances the edges and corners

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

Page 18: image Enhancement Digital Image Processing

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

Page 19: image Enhancement Digital Image Processing

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°.

Page 20: image Enhancement Digital Image Processing

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

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

Page 21: image Enhancement Digital Image Processing

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).

Page 22: image Enhancement Digital Image Processing

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.

Page 23: image Enhancement Digital Image Processing

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.

Page 24: image Enhancement Digital Image Processing
Page 25: image Enhancement Digital Image Processing

Result after implementing pencil effect using sobel operator

Page 26: image Enhancement Digital Image Processing

After Prewitt’s operator

Page 27: image Enhancement Digital Image Processing

After Laplacian operator

Page 28: image Enhancement Digital Image Processing

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.

Page 29: image Enhancement Digital Image Processing

-

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.

Page 30: image Enhancement Digital Image Processing

Emboss effect snapshot

Page 31: image Enhancement Digital Image Processing

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

Page 32: image Enhancement Digital Image Processing

Thank you