EASE Scheme of Image Zooming Documentation | Interpolation | Matlab

The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB

ABSTRACT:
Earlier there are different interpolation techniques for de-blurring of images. When an image is zoomed a checkerboard effect arises in the images. In order to remove/reduce interpolation artifacts such as image blur and the checkerboard effect (ringing), EASE tries to amend the interpolation error by employing the classical interpolation error theorem in an edge-adaptive fashion. In this project we are using an interpolation method, called the error-amended sharp edge (EASE) scheme, which is a modified bilinear method. In order to remove/reduce interpolation artifacts such as image blur and the checkerboard effect (ringing), EASE tries to amend the interpolation error by employing the classical interpolation error theorem in an edge-adaptive fashion. EASE is applied for image zooming by both integer and non integer magnification factors. The new interpolation scheme has proved to result in high-resolution images having clearer and sharper edges than linear interpolation methods, for all synthetic and natural images we are testing using MATLAB 7.0. EASE can be implemented with ease; it turns out to be similarly efficient as cubic interpolation schemes. More effective interpolation methods are yet to be developed in order to accurately preserve the edge orientation without introducing a high computation cost. This ease scheme is developed using MATLAB 7.0 software Index Terms—Checkerboard effect, directional Sobel derivative, Error-amended sharp edge (EASE) scheme, image zooming, interpolation, Interpolation error theorem.

Dept of ECE, GPREC, KNL

Page 1

The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB
1. INTRODUCTION
IMAGE re-sampling consists of two basic steps: interpolation and evaluation (sampling). Image interpolation turns discrete data into a continuous function, which is necessary for various geometric transform of discrete images. There are two kinds of interpolation methods: linear and nonlinear ones. For linear methods, diverse interpolation kernels of finite size have been introduced, in the literature, as approximations of the ideal interpolation kernel (the sinc function) which is spatially unlimited. However, such linear interpolation methods have been introduced without considering specific local information on edges. Thus, they may bring up artifacts, such as the checkerboard effect or image blur, when the image content shows discontinuities or edges. Nonlinear interpolation methods have been suggested to reduce the artifacts of linear methods. The major step in the nonlinear methods is to either fit the edges with some templates or predict edge information for the high resolution image from the low resolution one. However, these nonlinear methods are often computation-intensive and they can be one to two orders more expensive than linear methods for 2-D images. Furthermore, they may become ineffective in the estimation of the edge orientation for the class of edge models with fine scales (e.g., tightly packed edges that can be commonly found in the texture patterns). More effective interpolation methods are yet to be developed in order to accurately preserve the edge orientation without introducing a high computation cost. Recently, the authors have studied edge-forming methods as a post process of conventional interpolation schemes, to form clear and sharp edges by applying partial differential equations (PDEs) of anisotropic diffusion. Such PDE-based methods have proved to form reliable edges satisfactorily for image zooming by integer and non integer magnification factors, for both gray-scale and color images.

1.1 Image sensing and Acquisition Most of the images in which we are interested are generated by the combination of an illumination source and reflection or absorption of energy from that source by the elements of the scene being imaged. We enclose illumination and scene in quotes to emphasize the fact that they are considerably more general than the familiar situation in which the visible light source illuminates a common everyday 3D (three dimensional) scene. For example, the illumination may originate from a source such as ultrasound or even a computer generated Dept of ECE, GPREC, KNL Page 2

The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB
illumination pattern. Similarly, the scene elements could be familiar objects, but they can just as easily be molecules, buried rock formations, or a human brain. Depending on the nature of the source, illumination energy is reflected from, or transmitted through, objects .An example in the first category is light reflected from a planar surface .An example in the second category when x-rays pass through a diagnostic x-ray film. In some applications the reflected or transmitted energy is focused onto a photo converter which converts energy into visible light.

The below figure shows the three principal sensor arrangements used to transform illumination energy into digital images. The idea is simple: Incoming energy is transformed into a voltage by the combination of input electrical power and sensor material that is responsive to the particular type of energy being detected, the output voltage waveform is the response of the sensor and a digital quantity is obtained from the each sensor by digitising the response.

FIG 1.1

In order to generate a 2D image using a single sensor there has to be relative displacement in both x and y directions between the sensor and the area to be imaged .In this a film negative is mounted onto a drum whose mechanical rotation provides displacement in one dimension. A single sensor is mounted on a lead screw that provides motion in the perpendicular direction. Because mechanical rotation can be controlled with high precision , this method is inexpensive but slow way to obtain high resolution images other similar mechanical arrangements use a flat bed, with the sensor moving in two linear directions. Page 3

Dept of ECE, GPREC, KNL

The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB
1.2 Sampling and Quantization When we want to convert a continuous image digital image .An image may be continuous with respect to x and y directions, and also in amplitude .To convert into a digital form, we have to sample the function in both coordinates and in amplitude. Digitizing the coordinate’s values is called sampling. Digitizing the amplitude values is called quantization. 1.3What is Resampling? Digital images consist of a rectangular grid of evenly spaced pixels. Each pixel can be thought of as a measurement or sample of the light from a subject. Commonly, the original samples are obtained using a scanner or digital camera by averaging the amount of red, green and blue light that falls on the sensitive area of each of its CCD sensing elements.

Resampling is the mathematical technique used to create a new version of the image with a different width and/or height in pixels. Increasing the size of an image is called upsampling; reducing its size is called downsampling. When images are upsampled, the number of pixels increases, but, with reference to the original subject, new image detail cannot be created that was not already present in the original image. As a result, images normally become softer the more they ar enlarged since the amount of information per pixel goes down. When images are downsampled, information in the original image has to be discarded to make the image smaller. Thus if you downsample and then upsample an image, you will not get all the original image detail back. Downsampling a soft image can make it appear sharper even though it contains less information than the original.

Why is Resampling Important? A few situations where image resampling comes into play are:  Reducing the size of an image from a scanner or digital camera for emailing or display on the web. This step is normally followed by saving the file in JPEG format and uploading it to a web site or attaching it to an email message.  Increasing the size of an image before or during the printing process.

Printing an image almost always requires resampling it as it will usually be too small or too large to make a print of the desired size. This resampling is handled automatically by your Dept of ECE, GPREC, KNL Page 4

The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB
Windows printer driver. Most drivers do a good job of resizing images, but you can resample the image yourself prior to printing if you suspect the driver is not doing a good job. How Resampling Works It turns out that resampling a 2-dimensional image can be broken down into two onedimensional resampling passes. In one pass, horizontal resampling is performed producing an image with a different width but the same height. In the next pass, this intermediate image is resampled vertically, changing it height while leaving the width the same. This is computationally much more efficient than trying to combine the work into a single pass. Upsampling involves interpolating between the existing pixels to obtain an estimate of their values at the new pixel locations. Downsampling involves computing a weighted average of the original pixels that overlap each new pixel. In the mathematical subfield of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points. In engineering and science one often has a number of data points, as obtained by sampling or experimentation, and tries to construct a function which closely fits those data points. This is called curve fitting or regression analysis. Interpolation is a specific case of curve fitting, in which the function must go exactly through the data points. A different problem which is closely related to interpolation is the approximation of a complicated function by a simple function. Suppose we know the function but it is too complex to evaluate efficiently. Then we could pick a few known data points from the complicated function, creating a lookup table, and try to interpolate those data points to construct a simpler function. Of course, when using the simple function to calculate new data points we usually do not receive the same result as when using the original function, but depending on the problem domain and the interpolation method used the gain in simplicity might offset the error. 1.4 DEFINITION OF INTERPOLATION From inter meaning between and pole, the points or nodes. Any means of calculating a new point between two existing data points is therefore interpolation. There are many methods for doing this, many of which involve fitting some sort of function to the data and evaluating that Dept of ECE, GPREC, KNL Page 5

In the above figure. The simplest form of interpolation is to take the mean average of x and y of two adjacent points to find the mid point. This does not exclude other means such as statistical methods of calculating interpolated data.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB function at the desired point. A pair xk. Dept of ECE. GPREC. This will give the same result as linear interpolation evaluated at the midpoint. the blue curve connecting them is interpolation. we are looking for a function f so that. Figure 1. we sometimes write fk. Given a sequence of n distinct numbers xk called nodes and for each xk a second number yk. When the numbers yk are given by a known function f. KNL Page 6 .1: An interpolation of a finite set of points on an epitrochoid. yk is called a data point and f is called an interpolant for the data points. the points through which curve is splined are red.

discrete back projection for inverse Radon transform) and processing such as compression or re sampling.7568 −0. Interpolation provides a means of estimating the function at intermediate points. For example. Image interpolation techniques often are required in medical imaging for image generation (e.5. This thesis compares 1) Nearest neighbour interpolation 2) Bi-linear interpolation 3) Bi-cubic interpolation 4) B-spline interpolation The comparison is done by: Dept of ECE. Since the ideal interpolation function spatially is unlimited. such as x = 2. several interpolation kernels of finite size have been introduced. This can be explained in detail by taking an example given below. which gives some values of an unknown function f.g. KNL Page 7 .9589 −0.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB So.2: Plot of the data points as given in the table. the Interpolation provides a means of estimating the function at intermediate points.. x 0 1 2 3 4 5 6 f(x) 0 0.2794 Figure 1. GPREC.9093 0.8415 0.1411 −0. suppose we have a table like this.

Dept of ECE. and 3) Qualitative and quantitative interpolation error determinations for particular interpolation tasks which were taken from common situations in medical image processing. which are introduced in this chapter and proven to be within the best choices for medical image interpolation: the 6 X 6 Blackman–Harris windowed sinc interpolator. to define general properties and requirements of local techniques. 2) Computational complexity as well as runtime evaluations. They have been selected arbitrarily from clinical routine. KNL Page 8 . In general. GPREC. large kernel sizes were found to be superior to small interpolation masks. but the 6 X 6 cubic avoids the intrinsic border effects produced by the B-spline technique. the goal of this study was not to determine an overall best method. a set of 50 direct digital X rays was used. However. is easy to implement. a standardized notation is introduced and fundamental properties of interpolators are derived. However. and to enable the reader to select that method which is optimal for his specific application in medical imaging. but to present a comprehensive catalogue of methods in a uniform terminology. For local and Fourier analyses. For quantitative error evaluations. and the C2continuous cubic kernels with N = 6 and N = 8 supporting points. Successful methods should be direct current (DC)constant and interpolators rather than DC-inconstant or approximators. It appears to be the fastest six-point kernel to implement computationally. and has only small errors. the differences within the group of large sized kernels were not significant. the cubic 6 X 6 interpolator with continuous second derivatives and can be recommended for most common interpolation tasks. It provides eminent local and Fourier properties. This results in three novel kernels. Each method’s parameters are tuned with respect to those properties. Except for truncated sinc interpolators. all kernels with N = 6 or larger sizes perform significantly better than N = 2 or N = 3 point methods (p << 0:005). The same characteristics apply to B-spline interpolation. Summarizing the results.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 1) Spatial and Fourier analyses.

and we introduce generalized interpolation as a means to overcome the limitations of traditional interpolation. and C2-bicubic interpolation methods. The traditional view asks that they satisfy the interpolation property. The development tool used will be MATLAB. In this project. C1bicubic. Bi-linear and Bi-cubic interpolation can be performed. An important issue is the adequate choice of those basis functions. and many researchers have put a significant effort in optimizing them under this specific constraint This thesis proposes a new interpolation method. The resulting scheme has proved to result in zoomed images having sharper edges than bilinear. particularly when dealing with the large amount of data involved in volumetric medical imaging. MATLAB provides an excellent RAD environment. efficiency is another prime concern. Additionally. we analyze the tradeoff between the quality and the cost of several interpolation methods. the EASE technique can be implemented using MATLAB more conveniently. it is a prime concern when manipulating data. EASE is a modified bilinear method which tries to amend the interpolation error in an edge-adaptive way by employing the Interpolation Error Theorem.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 2. MOTIVATION FOR THE THESIS The issue of quality is particularly relevant to the medical community. MATLAB has few in built functions for interpolation of images. EASE is similarly efficient as cubic interpolation methods and can be implemented with ease. with its image processing toolbox. 2. For practical reasons. the performance of EASE Scheme has been found though the simulation in MATLAB and the results have been compared with the nearest neighborhood method.1 OBJECTIVES The objective will be to implement an Error-Amended Sharp Edge (EASE) Scheme for Image Zooming. The essence of interpolation is to represent an arbitrary continuously defined function as a discrete sum of weighted and shifted basis functions. The system is to be composed of a number of sub-systems. Using these techniques some of the basic Zooming techniques like Nearest neighbor interpolation. In this thesis. Any processing should result in the least computational effort. KNL Page 9 . GPREC. for ethical reasons. Any manipulation should result in the least amount of distortion or artifacts. and high level programming methodology. which correspond to each stage of image processing. Dept of ECE. called the Error-Amended Sharp Edge (EASE) scheme. so as not to influence the clinician’s judgment.

The MATLAB system consists of five main parts:  Development Environment.avi or . and the search path. This is the set of tools and facilities that help you use MATLAB functions and files. and browsers for viewing help. in a fraction of the time it would take to write a program in a scalar no interactive language such as C or FORTRAN. engineering. exploration.mpg to text format. It includes the MATLAB desktop and Command Window. MATLAB was originally written to provide easy access to matrix software developed by the LINPACK and EISPACK projects. GPREC. This allows you to solve many technical computing problems. simulation. MATLAB uses software developed by the LAPACK and ARPACK projects. files. visualization. and science. and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. In industry. including graphical user interface building. development. especially those with matrix and vector formulations. MATLAB is used convert . a command history. and analysis. which together represent the state-of-the-art in software for matrix computation. MATLAB is an interactive system whose basic data element is an array that does not require dimensioning. The name MATLAB stands for matrix laboratory. MATLAB has evolved over a period of years with input from many users.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 3 MATLAB MATLAB is a high-performance language for technical computing. MATLAB is the tool of choice for highproductivity research. and visualization  Scientific and engineering graphics  Application development. it is the standard instructional tool for introductory and advanced courses in mathematics. KNL Page 10 . It integrates computation. the workspace. and prototyping  Data analysis. Typical uses include:  Math and computation  Algorithm development  Modeling. Many of these tools are graphical user interfaces. In university environments. Dept of ECE. Today.

 The MATLAB Application Program Interface (API). input/output. Bessel functions. calling MATLAB as a computational engine. GPREC.1 MATLAB's desktop tools: You can also use MATLAB functions to perform most of the features found in the desktop tools. cosine. to more sophisticated functions like matrix inverse. This is a library that allows you to write C and FORTRAN programs that interact with MATLAB.  The MATLAB Language. This is a vast collection of computational algorithms ranging from elementary functions like sum. It allows both "programming in the small" to rapidly create quick and dirty throw-away programs. This is the MATLAB graphics system. KNL Page 11 . functions. It also includes low-level commands that allow you to fully customize the appearance of graphics as well as to build complete graphical user interfaces on your MATLAB applications. It includes high-level commands for two-dimensional and three-dimensional data visualization. data structures. and object-oriented programming features. The tools are:  Command Window  Command History  Launch Pad  Help Browser  Current Directory Browser  Workspace Browser  Array Editor  Editor/Debugger Command Window: Use the Command Window to enter variables and run functions and M-files. image processing. This is a high-level matrix/array language with control flow statements. 3. animation. Dept of ECE. and fast Fourier transforms. It include facilities for calling routines from MATLAB (dynamic linking). and complex arithmetic. matrix eigenvalues. and presentation graphics. and for reading and writing MAT-files.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB  The MATLAB Mathematical Function Library. sine.  Handle Graphics. and "programming in the large" to create complete large and complex application programs.

On Linux. and documentation.View a list of documents you previously designated as favorites. Help Browser: Use the Help browser to search and view documentation for all your Math Works products. The Help browser is a Web browser integrated into the MATLAB desktop that displays HTML documents. and copy and execute selected lines. KNL Page 12 . you can view previously used functions. To get help for a specific function. This is useful for invoking utilities or running other programs without quitting MATLAB.Use the arrows at the tops and bottoms of the pages. GPREC. demos. It includes:  Product filter . In the Command History. for example. You can run external programs from the MATLAB Command Window.Click the Add to Favorites button in the toolbar. When you quit the external program. view it in the display pane.  Contents tab . you can:  Browse to other pages . To save the input and output from a MATLAB session to a file. use the diary function.m.View the titles and tables of contents of documentation for your products. Use to Help Navigator to find information.  Index tab.Find specific index entries (selected keywords) in the Math Works documentation for your products.  Bookmark pages . Macs magik.Set the filter to show documentation only for the products you specify.  Favorites tab.m invokes an editor called emacs for a file named magik. or use the back and forward buttons in the toolbar.Look for a specific phrase in the documentation. After finding documentation using the Help Navigator. set the Search type to Function Name.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Command History: Lines you enter in the Command Window are logged in the Command History window. The exclamation point character is a shell escape and indicates that the rest of the input line is a command to the operating system. Dept of ECE. Launch Pad: MATLAB's Launch Pad provides easy access to tools. While viewing the documentation. the operating system returns control to MATLAB.  Search tab.

Alternatively.Click the print button in the toolbar. select Save Workspace As from the File menu. By default. GPREC. which has a . To save the workspace to a file that can be read during a later MATLAB session.Type a term in the Find in page field in the toolbar and click Go. Any file you want to run must either be in the current directory or on the search path. To view the workspace and information about each variable. Current Directory Browser: MATLAB file operations use the current directory and the search path as reference points. or use the save function. T o determine how to execute functions you call. Array Editor: Double-click on a variable in the Workspace browser to see it in the Array Editor. use the Workspace browser. Dept of ECE. Any file you want to run in MATLAB must reside in the current directory or in a directory that is on the search path. To delete variables from the workspace. Workspace Browser: The MATLAB workspace consists of the set of variables (named arrays) built up during a MATLAB session and stored in memory.or twodimensional numeric arrays. and loading saved workspaces. To read in a MAT-file. The workspace is not maintained after you end the MATLAB session. Use the Array Editor to view and edit a visual representation of one. which are organized in directories on your file system. KNL Page 13 . There are options for saving to different formats.mat extension. strings. use the clear function.  Find a term in the page . evaluating a selection. MATLAB uses a search path to find M-files and other MATLAB-related files. Other features available in the display pane are: copying information. select the variable and select Delete from the Edit menu. and viewing Web pages. the files supplied with MATLAB and Math Works toolboxes are included in the search path.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB  Print pages . This saves the workspace to a binary file called a MAT-file. or use the load function. or use the functions who and whos. running M-files. You add variables to the workspace by using functions. select Import Data from the File menu. and cell arrays of strings that are in the workspace.

KNL Page 14 . including. GPREC. control systems. The Editor/Debugger provides a graphical user interface for basic text editing. and can use preferences (accessible from the desktop File menu) to specify that editor as the default. fuzzy logic. Very important to most users of MATLAB. such as Emacs. If you use another editor. wavelets. which are programs you write to run MATLAB functions.  Spatial image transformations  Morphological operations  Neighborhood and block operations  Linear filtering and filter design  Transforms  Image analysis and enhancement  Image registration  Deblurring  Region of interest operations Dept of ECE. neural networks. simulation. toolboxes allow you to learn and apply specialized technology.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Editor/Debugger: Use the Editor/Debugger to create and debug M-files. you can still use the MATLAB Editor/Debugger for debugging. you can display it in the Command Window by using the type function.2 IMAGE PROCESSING TOOLBARS: The Image Processing Toolbox software is a collection of functions that extend the capability of the MATLAB numeric computing environment. Toolboxes are comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to solve particular classes of problems. 3. as well as for M-file debugging. The toolbox supports a wide range of image processing operations. You can use any text editor to create M-files. which sets a breakpoint. such as dbstop. Areas in which toolboxes are available include signal processing. If you just need to view the contents of an M-file. or you can use debugging functions. and many others. MATLAB features a family of application-specific solutions called toolboxes.

pout. imtool starts the Image Tool which presents an integrated environment for displaying images and performing some common image processing tasks. I = imread('pout. or by using the toolbox in combination with other toolboxes. Read and Display an Image First. To read an image. The example then performs some contrast adjustment on the image. The toolbox includes two image display functions imshow and imtool. The example reads one of the sample images included with the toolbox. the example writes the adjusted image to a file. such as the Signal Processing Toolbox™ software and the Wavelet Toolbox™ software. and stores it in an array named I. clear the MATLAB workspace of any variables and close open figure windows. GPREC. The Image Tool provides all the image display capabilities of imshow but also provides access to several other tools for navigating Dept of ECE. You can extend the capabilities of the toolbox by writing your own M-files. KNL Page 15 . imread infers from the file that the graphics file format is Tagged Image File Format (TIFF). For the list of supported graphics file formats. The example starts by reading an image into the MATLAB workspace. use the imread command.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Many of the toolbox functions are MATLAB M-files. imshow is the toolbox’s fundamental image display function. You can view the MATLAB code for these functions using the statement type function name. a series of MATLAB statements that implement specialized image processing algorithms. see the imread function reference documentation. Close all. Now display the image.tif. Finally.tif'). This example introduces some basic image processing concepts.

If you include the filename extension '. 'pout2. such as scroll bars. use the imshow function. imshow and imtool. Image Information tool. KNL . close open figure windows.png'). First.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB and exploring images. use the imwrite function. Both functions work within the Handle Graphics architecture: they create an image object and display it in an axes object contained in a figure object. moon = imread('moon. Imshow (I) To write the newly adjusted image I2 to a disk file. This example uses imshow. close all Read and display the grayscale image rice. clear the MATLAB workspace of any variables.png'.png.png'). and the Contrast Adjustment tool. Page 16 Dept of ECE. For more information. The following example reads an image into the MATLAB workspace and then displays the image in a MATLAB figure window. imwrite (I2. To display image data. GPREC. You can use either function to display an image. but you can specify other formats. See the imwrite function reference page for a list of file formats it supports. and close all open Image Tools. the Pixel Region tool. See also Writing Image Data to a File” on page 3-5 for more information about writing image data to files. imshow(I) The Image Processing Toolbox software includes two display functions. I = imread('rice. the imwrite function writes the image to a file in Portable Network Graphics (PNG) format.tif').“Displaying and Exploring Images”.

For file formats that support 16-bit data. GPREC. imread stores the data in the workspace as a uint8 array. If the image file format uses 8-bit pixels. This example reads a truecolor image into the MATLAB workspace as the variable RGB. in any of the supported bit depths. Image Displayed in a Figure Window by imshow READING IMAGE DATA To import an image from any supported graphics image file format. KNL Page 17 . imread uses two variables to store an indexed image in the workspace: one for Dept of ECE. such as PNG and TIFF. The imshow function displays the image in a MATLAB figure window. imread creates a uint16 array. RGB = imread('football.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB imshow(moon). as shown in the following figure. use the imread function.jpg').

for frame=1:27 % preallocate 4-D array [mri(:. In these examples.frame).tif'. KNL Page 18 . GPREC. imread infers the file format to use from the contents of the file. mri = zeros([128 128 1 27].:.map] = imread('mri. even though the image array It may be of class. Joint Photographic Experts Group (JPEG). [X. You can use imfinfo to determine how many images are stored in the file. If the graphics file contains multiple images. and Tagged Image File Format (TIFF) formats. imread imports a series of 27 images from a TIFF file and stores the images in a four-dimensional array. In this example. see imread and informants. End Dept of ECE.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB the image and another for its associated colormap. For the latest information concerning the bit depths and/or image formats supported.frame). You can also specify the file format as an argument to imread. Graphics Interchange Format (GIF). imread always reads the colormap into a matrix of class double.tif'). such as Microsoft® Windows® Bitmap (BMP).:.map] = imread('trees. imread imports only the first image from the file. To import additional images.'uint8'). you must use imread with format-specific arguments to specify the image you want to import. Portable Network Graphics (PNG). Imread supports many common graphics file formats.

bicubic. these use anywhere from 0 to 256 (or more) adjacent pixels when interpolating. so some cannot be used to distort or rotate an image. sinc. lanczos and others. Original Adaptive algorithms include many proprietary algorithms in licensed software such as: Qimage. bilinear. but this comes at the expense of much longer processing time.aiming to minimize unsightly interpolation artifacts in regions where they are most apparent. Depending on their complexity. Adaptive methods change depending on what they are interpolating (sharp edges vs. Genuine Fractals and others. These algorithms can be used to both distort and resize a photo.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 4 INTERPOLATION METHODS Interpolation is the process used to estimate an image value at a location in between image pixels. KNL Page 19 . These algorithms are primarily designed to maximize artifact-free detail in enlarged photos. smooth texture). The more adjacent pixels they include. There are many different interpolation methods. Some of the concerns to take into account when choosing an appropriate algorithm are: How accurate is the method? How expensive is it? How smooth is the interpolant? How many data points are needed? Common interpolation algorithms can be grouped into two categories: adaptive and nonadaptive. Many of these apply a different version of their algorithm (on a pixel-by-pixel basis) when they detect the presence of an edge-. some of which are described below. PhotoZoom Pro. Non-adaptive algorithms include: nearest neighbor. spline. whereas non-adaptive methods treat all pixels equally. GPREC. Dept of ECE. the more accurate they can become.

1). GPREC. The weightings are based on the distance each pixel is from the point.y) must be estimated from its discrete neighbors.. to determine the value for an interpolated pixel. They are used for the final 1-D interpolation in the y. 1 are generated by four one-dimensional (1-D) interpolations.direction. The small grey intermediate points in Fig..y) = h(x). KNL Page 20 .y) in a 4X4 neighborhood. for image resampling. Thus.y) from its discrete samples s(k. One-dimensional decomposition of the 2-D N ×N interpolation of the point (x. Interpolation is performed in the x direction first.h(y) …………………….y) = ∑k ∑l s(k. In each case.y) of a 2-D reconstruction filter s(x. Dept of ECE. As we discussed above. This can be described formally as the convolution of the discrete image samples with the continuous 2-D impulse response of a 2-D h(x. They then assign a value to the output pixel by computing a weighted average of some set of pixels in the vicinity of the point. symmetrical and separable interpolation kernels are used to reduce the computational complexity 2Dh(x.l). (1) Usually.y-1) …………………….The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB The interpolation methods all work in a fundamentally similar way.2Dh(x-k. they find the point in the input image that the output pixel corresponds to. Figure1. the amplitude at the position (x.y). 1 illustrates the interpolation of the point (x. (2) Fig. the interpolation step must reconstruct a twodimensional (2-D) continuous signal s(x.

2(a)] …………………(3) Clearly. The gain in the pass band rapidly falls off to 2/π 64% at the cutoff point.e. Therefore. No other pixels are considered i. Here the output pixel is assigned the value of the pixel that the point falls within.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 4. The logarithmical scale shows prominent sidelobes in those regions of the frequency domain where the repetitions of S caused by s scanning should be suppressed [Fig. 2(c)]. KNL Page 21 . 2(b) shows that the Fourier spectrum of the nearest neighbor kernel equals the sinc function (expressed in the frequency domain). Dept of ECE. and the amplitude of the side maxima is more than 20%. Therefore. h1(x) is a DC-constant interpolator Figure2. This is tantamount to convolution with a rect function [Fig. in this method. we are trying to approximate the sinc function by a spatially limited kernel that can be given by the nearest neighbor. Nearest Neighbor Interpolation a) Kernel b) Magnitude of Fourier Transform c) Logarithmic plot of magnitude Fig.1 NEAREST NEIGHBOUR INTERPOLATION Nearest neighbor is the most basic and requires the least processing time of all the interpolation algorithms because it only considers one pixel-. GPREC. strong aliasing and blurring effects are associated with the nearest neighbor method for image interpolation. This has the effect of simply making each pixel bigger.the closest one to the interpolated point. only N=1 supporting point is required for the nearest neighbor interpolation. The value s(x) at the location (x) is chosen as the next known value s(k).

h2(±1.2. the linear approximation of the sinc function follows the triangular function ……………… (4) The triangular function h2(x) corresponds to a modest low-pass filter H2(f) in the frequency domain [figure 3]. GPREC. KNL Page 22 . It then takes a weighted average of these 4 pixels to arrive at its final interpolated value..H2(0)=1 and H2(±1.2 BI-LINEAR INTERPOLATION Bilinear interpolation considers the closest 2x2 neighborhood of known pixel values surrounding the unknown pixel. Here the values of both direct neighbors are weighted by their distance to the opposite point of interpolation.)=0. Bi-linear Interpolation a) Kernel b) Magnitude of Fourier Transform c) Logarithmic plot of magnitude Dept of ECE. Therefore. Again.…)=0.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 4.. Figure3.h2(0)=1.2. This results in much smoother looking images than nearest neighbor.

The side lobes in the stop band are below 10%. KNL Page 23 .The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Therefore. 4. and assigns that value to the output coordinates or CC calculates a distance weighted average of a block of 16 pixels from the original image which surround the new output pixel location. the linear kernel is a Dc constant interpolator. Therefore. which still is considerable. Dept of ECE. GPREC. the main disadvantages of linear interpolation are both the attenuation of high-frequency components and the aliasing of the data beyond the cutoff point into the low frequencies.3 CUBIC CONVOLUTION: Cubic convolution determines the grey level from the weighted average of the 16 closest pixels to the specified input coordinates.

enhancement algorithm include exact interpolation (for 'distortion less' or 'lossless' processing) adjustable resolution. such as the checkerboard effect or image blur. adjustable smoothness. Thus. EASE tries to amend the interpolation error by employing the classical interpolation error theorem in an edge-adaptive fashion. they may become ineffective in the estimation of the edge orientation for the class of edge models with Dept of ECE. Furthermore. INTRODUCTION TO EASE This thesis explains a new interpolation method. There are two kinds of interpolation methods: linear and nonlinear ones. For linear methods. KNL Page 24 . In order to remove/reduce interpolation artifacts such as image blur and the checkerboard effect (ringing). and ease of computation. GPREC. The major step in the nonlinear methods is to either fit the edges with some templates or predict edge information for the high resolution image from the low resolution one. 5. However.1 ERROR AMENDED SHARP EDGE SCHEME FOR IMAGE INTERPOLATION Desirable features of any digital image resolution. these nonlinear methods are often computation-intensive and they can be one to two order more expensive than linear methods for 2-D images. which is necessary for various geometric transform of discrete images. they may bring up artifacts. Nonlinear interpolation methods have been suggested to reduce the artifacts of linear methods. diverse interpolation kernels of finite size have been introduced. However. As discussed above the image re-sampling consists of two basic steps: interpolation and evaluation (sampling). as approximations of the ideal interpolation kernel which is spatially unlimited. The new interpolation scheme has proved to result in high-resolution images having clearer and sharper edges than linear interpolation methods. called the error-amended sharp edge (EASE) scheme.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 5. for all synthetic and natural images we have tested. when the image content shows discontinuities or edges. Image interpolation turns discrete data into a continuous function. which is a modified bilinear method. EASE can be implemented with ease. in the literature. EASE is applied for image zooming by both integer and non integer magnification factors. such linear interpolation methods have been introduced without considering specific local information on edges. it turns out to be similarly efficient as cubic interpolation schemes.

The organization of this article is as follows. EASE can be implemented with ease. we introduce the EASE scheme for 1-D signals and 2-D images. the interpolation error will be amended by the interpolation error theorem in an edge-adaptive fashion.g. we will introduce a new interpolation method. More effective interpolation methods are yet to be developed in order to accurately preserve the edge orientation without introducing a high computation cost.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB fine scales(e. and at most seven pixel values for the resampling. however. the C1-and C2 -bicubic methods. The next section presents a brief review of linear interpolation methods and the interpolation error theorem. as preliminaries. the new interpolation scheme results in clearer and sharper edges for all synthetic. the authors have studied edge-forming methods as a postprocess of conventional interpolation schemes. natural. In EASE. Such PDE-based methods have proved to form reliable edges satisfactorily for image zooming by integer and noninteger magnification factors. to form clear and sharp edges by applying partial differential equations (PDEs) of anisotropic diffusion. It is applicable to image zooming by both integer and noninteger magnification factors conveniently. In the next section. EASE turns out to be similarly efficient as the C2 -bicubic and bicubic B-spline interpolation schemes. however. KNL Page 25 . for both gray-scale and color images. The section discusses strategies for the computation of the error amender in an edge-adaptive manner and the estimation of the edge orientation. each resampling evaluation requires at most 12 pixel values of the low resolution image for the estimation of the edge orientation. Section V summarizes our development and experiments. Dept of ECE. Compared with linear methods such as the bilinear. and medical images we have tested.. tightly packed edges that can be commonly found in the texture patterns). In this article. Recently.called the error-amended sharp edge (EASE) scheme. After this section we have presented the numerical experiments to show superior properties of EASE in the preservation of edges. The EASE scheme is based on the bilinear interpolation method. and the bicubic B-spline interpolators. it shows an ability to preserve edges much better than those conventional linear interpolation schemes. GPREC.

... KNL Page 26 .y) from its discrete image samples u(k. the problem is to be able to estimate the values of the curve at any position between the known points. the interpolation kernel H2D is selected to be symmetric and separable to reduce the computational complexity ……………..... Each segment (bounded by two data points) can be interpolated independently.. The idea is that the points are in some sense correct and lie on an underlying but unknown curve. Then.. we will present the interpolation error theorem as a preliminary of our new interpolation scheme.3 LINEAR INTERPOLATION METHODS Linear interpolation is the simplest method of getting values at positions in between the data points. (3. the techniques discussed here have the characteristic that the estimated curve passes through all the given points.. (3. The points are simply joined by straight line segments.. It can be formally expressed as the convolution of the discrete image samples with a continuous 2-D filter H2D .The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 5.l)...2) Dept of ECE.. This section begins with a brief review of linear interpolation methods.. Interpolation as used here is different to "smoothing"..1) Usually. The interpolation step of image resampling is to construct a 2-D continuous function u(x. 5.... GPREC.2 PRELIMINARIES Discussed here are a number of interpolation methods. The main attributes is that they are easy to compute and are stable. this is by no means an exhaustive list but the methods shown tend to be those in common use in computer graphics. where x and y are real numbers and k and l are integers.

H (-x) =H(x). and.3) are called interpolators. In other words. It is often required for the kernel H to satisfy the zero crossing condition H (0) = 1 H (x) = 0. with which our new interpolation scheme will be compared.. The converse is not always true. the mean brightness of the image is not altered when the image is interpolated or resampled. we present a few kernels of linear interpolation methods.e. we consider popular ones such as the linear. therefore. (3. In particular.3) And the partition of unity condition ………… (3..3) guarantee that the image is not modified if it is resampled on the same grid. i. for a completeness of the article. It is known that superior kernels are interpolators and DC-constant.Kernels that fulfill (3.4) The conditions in (3. KNL Page 27 . Kernels that satisfy or fail (3. Here. GPREC. while others are called approximators. and cubic B-spline kernels …….The condition (3.5) Dept of ECE.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Where H is symmetric.4) implies that the energy of the resampled image remains unchanged.4) are named respectively direct current (DC)-constant or DCinconstant. |x|=1. the kernel can avoid smoothing and preserve high frequencies. cubic. 2…… ……………(3.

it follows from the theorem that for two points x0 and x0+h.spline is its associated cubic B-spline interpolator satisfying the zero crossing condition (3. Then xЄ[a. * denotes the convolution.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Where a is a parameter. Theorem 1: (Interpolation Error Theorem): Let the interval be partitioned in to {a= x0<x1<….continuity by setting a=-3/4. Then.4 INTERPOLATION ERROR THEOREM The following theorem can be found in most textbooks dealing with introductory numerical methods.4) .. The interpolator Hcubic is C1.. GPREC. for every x Є [a. one can impose C2. Assume that uN+1 (x) exists for each x Є[a..continuous. while HB. and Here.3)and the partition of unity condition (3.b] such that ………. there is a point ξ between x0 and x0+h such that Dept of ECE.7) When N=1. for some M>0. 5. there is a point ξЄ[a. in general. assume that the points are uniformly spaced and max M . KNL Page 28 .< Xn =b} and an N th-order polynomial Pn interpolate at the nodal points of the partitioning.6) | uN+1(x)| ≤ Furthermore.b].H3 is the cubic B-spline approximator . (3.b].b] ……. (3.

where xi. the above identity becomes ………. For later references.k-1. particularly (3. as ………(3.9) and (3.10) For some ξ1 Є (x0.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB ……… (3.xi=h.x0+h). we will explore the interpolation error theorem. GPREC. In particular. (3...8) For x = x0+ (j/k)h. where k is an integer (k≥2) and j= 1. we define the second-order Newton polynomial interpolating over {xi-1. in order to derive an effective interpolation scheme.9) for some ξj Є (x0.11) Dept of ECE.xi-1 = xi+1. we have ……… (3. x0+h).. xi. In the next section. when k=2 and j=1.….10).xi+1}. KNL Page 29 .

KNL Page 30 . GPREC. Dept of ECE. The only assumption we need is that the given image is locally smooth. Pick a point P Є (xi.. EASE FOR 1-D SIGNALS We will begin with the EASE scheme applied for the interpolation of an 1-D signal. (3. (3. For simplicity.10) that ………….xi+1).13) For some ξ1 Є (xi.12) Where Ci+1/2 is an error-amender defined as ………….The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 5. 1. IMPLEMENTATION OF EASE This section introduces EASE which tries to amend the error of the bilinear method by adopting the interpolation error theorem in an edge-adaptive way.5. xi+1) as in Fig. A. where u is to be evaluated. we first let p be the midpoint of xi and xi+1 Then it follows from (3.

since It follows from (3. however. For example. The error-amender is not available for the current interpolation. assuming that the second derivative u “ varies little on each smooth portion of the signal. we suggest the EASE scheme for the interpolation of 1-D signals (by a magnification factor of 2 ) as follows: ……… (3.14) and Dept of ECE.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB The error-amender Ci+1/2 is ideally the vertical distance connecting the two points in Fig.15). Then from (3.10) that the quantity C L can be seen as an error-amender which represents the interpolation error …………… (3. 1 marked by o and □.xi+1) .xi+1). GPREC.16) Where CL and CR are defined as in (3.15) for some ξ2 Є (xi-1. it may be estimated by utilizing the following quantities: ……… (3. KNL Page 31 .13) and (3.14) Here it must be noticed that C L and C R can be considered as error-amenders when the signal u is to be interpolated from a lower resolution. we have Thus. Now we assume that the second derivative u ” varies little over (xi-1.

The EASE scheme for the interpolation of 1-D signals (by a magnification factor of k ≥2) can be formulated as follows: for xi+j/k= xi+ j/k. • EASE has been developed based on the assumption that u” varies little. it may reveal common artifacts (such as image blur and ringing) at pixels where the image content is varying fast locally.k-1 …………. xi+1) is assumed to contain either an edge or an inflection point.18) Where p2. and. it is nonlinear overall due to the involvement of the minmod function.i-1 and the linear interpolation of ui-1 and ui+1. both evaluated at xi-1+2j/k ……………. When the values CL and CR have different signs. the interval (xi.. j=1. KNL Page 32 . The EASE scheme is an edge-adaptive interpolation scheme.1. Thus.(3.p2.17) Where And Di-1(j/k) is defined to be the difference between.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB The “minmod” determines the direction of the error-amending.(3.11).…. The above scheme can be applied for image zooming by a magnification factor of k ≥2 . The minmod function chooses the minimum in modulus when and show the same sign. therefore. the linear interpolation scheme can be accurate enough to evaluate ui+1/2 . The selection process in the minmod function is introduced in order to reduce the Dept of ECE. GPREC. We close this subsection along with the following remarks.i-1 is defined in (3.1.

The solid circular dots indicate pixels from the original image of low resolution. We begin with the interpolation for the points marked by □ . EASE has interpolated various images satisfactorily and more effectively than other linear interpolation methods.18) are still valid although j/k is replaced by a real number ξЄ(0. the aligned points. Given CL and CR . KNL Page 33 . the minmod function determines the same error-amending direction for all sampling points xi+ξЄ (xi+xi+1). Dept of ECE.17) and (3. Note that (3. for each interpolation point. This step can be simply performed by computing a series of 1-D directional (horizontal or vertical) interpolations. In practice.1). B. the evaluation can be performed by linear interpolation followed by an error-amending. EASE FOR 2-D IMAGES In Fig. GPREC.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB ringing artifact in the interpolation result and to incorporate an edge-adaption mechanism as well. • EASE can be applied for image zooming by arbitrary magnification factor. 2. the values can be computed by applying the 1-D EASE scheme presented in Section III-A. we present an illustration of EASE to be applied for the (2× 2)-magnification of 2D images. There.

the interior points. see Section III-C below.19) Assuming that the image content on the edges is locally bilinear.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Let all values at the aligned points be evaluated. the two flattest directions can be proved to be adjacent to each other. In order to estimate the edge orientation. in the vertical/horizontal direction and the 45 /135 degrees direction …………. we must determine values at points marked by }. GPREC. the interpolation formula along the edge direction can be derived as follows: …………. respectively. they differ by 45degrees .21) Dept of ECE. Furthermore. We will evaluate these values by trying to interpolate along the local edge direction. we can see that the edge direction is between the two directions that evaluate the two smallest directional Sobel derivatives. Then. KNL Page 34 ..(3.(3.(3.e. i.j+1/2) ………….20) Then. Let Dp and Dq be the two smallest directional Sobel derivatives.. we first compute absolute values of four directional Sobel derivatives at each circled point (i+1/2.

3. For the interior points ( s). because otherwise the edge orientation is difficult to determine and the formula (3. For example. It is straightforward to apply the above scheme for image zooming of a k×k –magnification where k≥2 is an integer. utilizing the same estimated edge orientation. the interpolation along the estimated edge direction can be fulfilled correspondingly for all (k-1)×(k-1) interior sampling points. assume that D1(horizontal) and D2 (450) are the two smallest directional Sobel derivatives. The aligned points can again be determined as for 1-D signals. Once the two flattest directions are determined. KNL Page 35 . GPREC. Dept of ECE.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB The claim that the two flattest directions differ by 45 degrees plays an important role in the estimation of the edge direction. the four directional Sobel derivatives can be computed as in image zooming by (2×2)-magnification.21) is hardly meaningful. Then the interpolation procedure for every interior point (marked by ) can be summarized as follows. as in Fig.

The 1-D EASE scheme is utilized for the computation of values at the aligned points. KNL Page 36 . 3) Evaluate the value at o .21) …………. GPREC. respectively. utilizing the formula (3. 5. 2) Obtain L1 and L2 which interpolate linearly the aligned values for the interior point in the horizontal and 450 directions. 6. On the other hand.. Dept of ECE.(3. it fulfills the sampling by utilizing 3. higher-order interpolation schemes may introduce higher levels of image blur or checkerboard effect. However. The major challenge in image zooming is to estimate local edges in order not to interpolate the data across them.u0 . The basic idea of EASE is applicable for higher-order linear interpolation schemes along with corresponding error-amenders.22) where L1 and L2 are obtained at the previous step. Note that EASE utilizes 12 points in maximum for the estimation of the edge orientation: the four corner points and two nearest points outside each of four sides. EASE is designed to be both low order (requiring a small support for the interpolation kernel) and edge-adaptive.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 1) Compute four values at the corresponding aligned points( □s) which are in either the horizontal or 450 direction from the interior point(o) . It is clear to see that the support of the EASE interpolation kernel is a proper subset of those of cubic schemes such as the C2-bicubic and bicubic B-spline methods. or 7 pixel values of the low resolution image.

GPREC. KNL Page 37 .The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 6. EXPERIMENTAL RESULTS Input image: RGB to Gray 100% of the image Dept of ECE.

KNL Page 38 . GPREC.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Image zoomed to 400% using nearest neighborhood method in Matlab Dept of ECE.

KNL Page 39 . GPREC.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Imaged Zoomed using EASE Scheme by a factor 4 Dept of ECE.

GPREC.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB Comparison of EASE and nearest neighborhood methods Dept of ECE. KNL Page 40 .

%Transfering the pixel values from input image to the output image*/ count2=0. %To conver the data clause of the image to double*/ if z==3 img1=rgb2gray(img2). for i=k+1:k:(k*m+1) count1=count1+1. imview(img1).j)+img(count1.k).k*n+k*3).n.z]=size(img2). for j=k+1:k:(k*n+1) count1=0.j)=a(i.m. count2=count2+1. GPREC. end img=im2double(img1). k=4.count2).The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 7. KNL Page 41 .jpg'). Dept of ECE. imview(img2). else img1=img2. %Function to convert RGB image to gray image*/ [m.n.img2. Source Code: %NOTE:program for ease k*k */ function a=e2(img. a(i. % Zero padding and preallocating the memory*/ a=zeros(k*m+k*3. img2=imread('kalam.

GPREC. end for p=1:1:k-1 x1=4*x*(p/k)*(1-p/k). else x=c2.i-1)-(a(j.i-1)*(1-p/k)+(p/k)*a(j.5.i+p-1)+a(j. KNL Page 42 . c2=a(j.i+2*k-1))*0.5.i-1)+a(j.i+p-1)=a(j.i+k-1)+x1*0.i+k-1))*0.i+k-1)-(a(j. a(j. end end end Dept of ECE.25. end else x=0.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB end end %To find the aligned points in horizontal direction*/ for j=k+1:k:k*m for i=k+2:k:k*n %Calculating minmod function*/ c1=a(j.i-k-1)+a(j. if((c1*c2)>0) if(abs(c1)<=abs(c2)) x=c1.

i)+a(j+2*k-1.i))*0. GPREC.i)+x1*0. if((c3*c4)>0) if(abs(c3)<=abs(c4)) y=c3.i))*0. a(j+p-1. KNL Page 43 .The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB %To find the aligned points in vertical direction*/ for i=k+1:k:(k*n+1) for j=k+2:k:(k*m+2) c3=a(j-1.i)-(a(j-k-1. end end end %To find the interior points*/ for j=k+1:k:k*m+1 for i=k+1:k:k*n+1 %To estimate the edge direction using sobel derivatives*/ Dept of ECE.i)*(1-p/k)+(p/k)*a(j+k-1. else y=c4.i)+a(j+k-1.i)=a(j+p-1.5. end for p=1:1:k-1 x1=4*y*(p/k)*(1-p/k). end else y=0.i)+a(j-1.25. c4=a(j+k-1.i)-(a(j-1.5.

i)-(a(j+k.5.i)+a(j.i-k)+a(j+k.i)+a(j+k.i)+a(j+k.i-k)+a(j. x8=a(j.i)+a(j.5.i+k)-(a(j+k. x6=a(j+k.5.25. x5=a(j+k. end e1=(a(j. if((x2*x3)>0) if(abs(x2)<=abs(x3)) x1=x2.i+k))*0.i+k))*0.i)-(a(j.i+2*k))*0.i+k))*0.i+2*k))*0. end else x4=0.i)+a(j+k. GPREC.5.i))*0. end e2=(a(j+k.i+k))*0.25.5. else x1=x3.i)-(a(j-k.5+x4*0.i+k)-(a(j. else x4=x6. end else x1=0.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB x2=a(j.5+x1*0. if((x5*x6)>0) if(abs(x5)<=abs(x6)) x4=x5. Dept of ECE. x3=a(j. KNL Page 44 .

i+k)+e4-e3-a(j+k. d2=(sqrt(2))*abs(e1+a(j.i+k)+2*e1+a(j. x12=a(j+k.5.5+x10*0.i+k)+a(j+2*k.i+k)-a(j+k.i+k))*0.i+k)-(a(j.25.i+k))*0.i+k)-a(j+k. d1=abs(a(j+k.i)+2*e1+a(j.i))*0.i)+a(j+2*k. end else x7=0. end e4=(a(j. if((x8*x9)>0) if(abs(x8)<=abs(x9)) x7=x8.i+k))*0.i)).25.i+k)+a(j+k.i)-2*e2-a(j+k. GPREC.i)-(a(j.i+k)).5. if((x11*x12)>0) if(abs(x11)<=abs(x12)) x10=x11.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB x9=a(j+k.5.i)-e2).i)+a(j+k.i+k)-(a(j-k.5+x7*0.i))*0.i+k)+a(j+k. end e3=(a(j. x11=a(j.i)-2*e3-a(j. d3=abs(a(j. Dept of ECE. end else x10=0. else x7=x9. KNL Page 45 . else x10=x12.

GPREC.i+i1). end elseif(d2>d4) dq=d4.i)+(i1/k)*a(j+j1.i+k1).i+k1-k)+(1-((k-i1)/(2*k-k1)))*a(j+k1-k.i+k)-e4).i+k). elseif(d1>d3) dp=d3. if(k1<=k) lq=(1-i1/k1)*a(j+k1. if(d1<=d3) dp=d1. for j1=1:1:k-1 for i1=1:1:k-1 k1=i1+j1.i+k2)+(j1/(k-k2))*a(j+k-k2.i+i1)+(j1/k)*a(j+k.i+k+k2).i)+(i1/k1)*a(j. lp=(1-j1/k)*a(j. lp=(1-i1/k)*a(j+j1. end Dept of ECE. if(j1<=i1) lq=(1-j1/(k-k2))*a(j.i+k). elseif(k1>k) lq=((k-i1)/(2*k-k1))*a(j+k. elseif(j1>i1) lq=(1-i1/(k+k2))*a(j-k2.i)+e1-e2-a(j+k.i)+(i1/(k+k2))*a(j+k.i+k). end if(d2<=d4) dq=d2.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB d4=(sqrt(2))*abs(e3+a(j. KNL Page 46 . k2=i1-j1.

%Output image*/ imview(a1) Dept of ECE. end end end end %Cropping the image to the required size*/ a1=a(k+1:k*m+2.414*dq))+(dp*lq)/(dp+1.i+i1)=(1.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB end a(j+j1.414*dq*lp/(dp+1. GPREC.414*dq). KNL Page 47 .k+1:k*n+2).

The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 8. and the bicubic B-spline interpolator.  The new interpolation scheme has proved better in accuracy and reliability than linear interpolation methods such as the bilinear scheme. EASE turns out to be similarly efficient as cubic interpolation schemes. EASE is based on the bilinear method and tries to amend the error by utilizing the interpolation error theorem in an edge-adaptive way. the C1.and C2bicubic methods. called the EASE scheme. GPREC. Dept of ECE.  Effective strategies have been suggested for the computation of the erroramender and the estimation of edge directions by utilizing local pixel values. KNL Page 48 . CONCLUSIONS  We have introduced a new interpolation method.

The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB 9. 1978. Image Process. no.. Nov. 2006. 1153–1160. and S. Gönner. ASSP-29. pp. Cha and S. [9] R. Unser.18. Acoust. C.. pp. Blu.” J.” IEEE Trans.. 710–719. G. Math. Andrews. 15. and M. vol. no..” IEEE Trans.. no. IEEE Int. Conf.. 6.. [2] T. Digital Image Processing. vol. Med. no. 2002. Imag.1293–1297. 242–245. [3] W. Dept of ECE. 8. Acoust. Keys. Kim. Sep.” IEEE Trans. [5] Y. Cha and S. “Cubic convolution interpolation for digital image processing. and M. C. Blu. Hou and H. KNL Page 49 . “Edge-forming methods for image zooming. 5. Thévenaz. no. Image Process.” IEEE Trans. pp. Jun. Chuang. Signal Process. May 2004.” IEEE Trans. 4.” in Proc. 2nd ed. vol. Lehmann. GPREC. “Linear interpolation revitalized.. 1998. 8. “Subpixel edge localization and the interpolation of still images.. Unser. 2315–2323. 11. vol. S. pp. Image Processing. Carey.” IEEE Trans. 1981. [4] Y. [10] T. Vis. 1999. Hemami. Speech. ASSP-26.” IEEE Trans. “Regularity-preserving image interpolation. P. Imag. 1999. no. 9. 1049–1075. pp. [6] R. vol. Aug. 353–364. Image Process. D. pp. Signal Process. Gonzalez and R. NJ: Prentice-Hall. Upper Saddle River. Jun. 285–295. Speech. Jensen and D. 25. “Cubic splines for image interpolation and digital filtering. vol. [8] K. vol. vol. pp. 508–517. 6.Woods. Anastassiou. 2006. pp. [7] H. no. Spitzer. pp. 13. “Minimum support interpolators with optimum approximation properties. “Survey: Interpolation methods in medical image processing. and K. P. May 1995. BIBLIOGRAPHY [1] T. no. “Edge-forming methods for color image zooming. 3. Kim. Thévenaz. 3. Image Processing.

Oct. Gönner. 660–665. pp. “New edge-directed interpolation. “Enlargement and reduction of digital images with minimum loss of information. pp. 1995. A. Imag.. 739–758. Spitzer. “Interpolation revisited. 2001. 7. 1521–1527. vol. Li and M. Image Process. Unser. 10. and K.” IEEE Trans. 3. no. 7..20. vol. 4. Med. C. “Addendum: B-spline interpolation in medical image processing. Eden. Imag.” IEEE Trans. 247–257. Unser. vol.. pp. Jul. [13] P. no. Orchard. Jul. KNL Page 50 . T.. Blu. and M. 2000.” IEEE Trans. no. [14] M.The Error-Amended Sharp Edge (EASE) Scheme for Image Zooming Using MATLAB [11] T. vol. GPREC. 10. Image Process. Dept of ECE. Mar.” IEEE Trans. pp. [12] X. no. Aldroubi. and M. Med. 2001. 19. Lehmann. Thévenaz.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.