EEL 6562 Image Processing and Computer Vision Box Filter and Laplacian Filter Implementation

Similar documents
EEL 6562 Image Processing and Computer Vision Image Restoration

Filtering in the spatial domain (Spatial Filtering)

Image Enhancement in spatial domain. Digital Image Processing GW Chapter 3 from Section (pag 110) Part 2: Filtering in spatial domain

Image Enhancement using Histogram Equalization and Spatial Filtering

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

Lecture No Image Filtering (course: Computer Vision)

Sharpening Spatial Filters ( high pass)

June 30 th, 2008 Lesson notes taken from professor Hongmei Zhu class.

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

LAB MANUAL SUBJECT: IMAGE PROCESSING BE (COMPUTER) SEM VII

from: Point Operations (Single Operands)

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

NON UNIFORM BACKGROUND REMOVAL FOR PARTICLE ANALYSIS BASED ON MORPHOLOGICAL STRUCTURING ELEMENT:

Digital Image Processing 3/e

Development of Image Processing Tools for Analysis of Laser Deposition Experiments

Images and Filters. EE/CSE 576 Linda Shapiro

Frequency Domain Enhancement

Digital Image Processing

Digital Image Processing

1.Discuss the frequency domain techniques of image enhancement in detail.

TDI2131 Digital Image Processing (Week 4) Tutorial 3

Histogram Equalization: A Strong Technique for Image Enhancement

IMAGE PROCESSING PAPER PRESENTATION ON IMAGE PROCESSING

COMBINING LAPLACIAN AND SOBEL GRADIENT FOR GREATER SHARPENING

CSE 564: Scientific Visualization

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

Digital Image Processing

DIGITAL IMAGE DE-NOISING FILTERS A COMPREHENSIVE STUDY

Image Filtering. Median Filtering

Computing for Engineers in Python

Applying mathematics to digital image processing using a spreadsheet

Matlab (see Homework 1: Intro to Matlab) Linear Filters (Reading: 7.1, ) Correlation. Convolution. Linear Filtering (warm-up slide) R ij

Digital Image Processing

Evaluation of image quality of the compression schemes JPEG & JPEG 2000 using a Modular Colour Image Difference Model.

Motion illusion, rotating snakes

Images with (a) coding redundancy; (b) spatial redundancy; (c) irrelevant information

Image Enhancement. DD2423 Image Analysis and Computer Vision. Computational Vision and Active Perception School of Computer Science and Communication

Topic 4: Image Filtering Workshop Solutions

Practical Image and Video Processing Using MATLAB

CoE4TN4 Image Processing. Chapter 4 Filtering in the Frequency Domain

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

Chapter 12 Image Processing

A Division of Sun Chemical Corporation. Unsharp Masking How to Make Your Images Pop!

Raster Based Region Growing

Non Linear Image Enhancement

Objective Evaluation of Edge Blur and Ringing Artefacts: Application to JPEG and JPEG 2000 Image Codecs

Computer Vision, Lecture 3

Image Processing Computer Graphics I Lecture 20. Display Color Models Filters Dithering Image Compression

Chapter 6. [6]Preprocessing

Digital Image Processing. Lecture # 8 Color Processing

Color Transformations

Chapter 2 Image Enhancement in the Spatial Domain

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Carmen Alonso Montes 23rd-27th November 2015

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

International Conference on Advances in Engineering & Technology 2014 (ICAET-2014) 48 Page

Lecture 4: Spatial Domain Processing and Image Enhancement

Guided Image Filtering for Image Enhancement

Image Enhancement in the Spatial Domain (Part 1)

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

VU Signal and Image Processing. Image Enhancement. Torsten Möller + Hrvoje Bogunović + Raphael Sahann

IMAGE PROCESSING Vedat Tavşanoğlu

Digital Images. Activity J7. Tips and Suggestions. What s This Activity About? What Will Students Do? What Will Students Learn? Concepts.

Last Lecture. photomatix.com

Performance Evaluation of Edge Detection Techniques for Square Pixel and Hexagon Pixel images

2.1. General Purpose Run Length Encoding Relative Encoding Tokanization or Pattern Substitution

Midterm Examination CS 534: Computational Photography

Introduction to DSP ECE-S352 Fall Quarter 2000 Matlab Project 1

USE OF HISTOGRAM EQUALIZATION IN IMAGE PROCESSING FOR IMAGE ENHANCEMENT

Solution Q.1 What is a digital Image? Difference between Image Processing

Image Perception & 2D Images

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)

Computer Vision for HCI. Noise Removal. Noise in Images

02/02/10. Image Filtering. Computer Vision CS 543 / ECE 549 University of Illinois. Derek Hoiem

Compression and Image Formats

Lossy and Lossless Compression using Various Algorithms

Image Smoothening and Sharpening using Frequency Domain Filtering Technique

Image Processing for feature extraction

Image Processing Lecture 4

Design of Various Image Enhancement Techniques - A Critical Review

Lecture 17.5: More image processing: Segmentation

Figure 1. Mr Bean cartoon

Transforms and Frequency Filtering

Spatial Domain Processing and Image Enhancement

2. Pixels and Colors. Introduction to Pixels. Chapter 2. Investigation Pixels and Digital Images

Removal of Gaussian noise on the image edges using the Prewitt operator and threshold function technical

Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

Background. Computer Vision & Digital Image Processing. Improved Bartlane transmitted image. Example Bartlane transmitted image

Image Processing by Bilateral Filtering Method

Unit 4.4 Representing Images

Fig 1: Error Diffusion halftoning method

Contrast Image Correction Method

What is image enhancement? Point operation

The next table shows the suitability of each format to particular applications.

FOG REMOVAL ALGORITHM USING ANISOTROPIC DIFFUSION AND HISTOGRAM STRETCHING

FPGA IMPLEMENTATION OF RSEPD TECHNIQUE BASED IMPULSE NOISE REMOVAL

Digital Image Processing

A Study on Image Enhancement and Resolution through fused approach of Guided Filter and high-resolution Filter

Digital Photogrammetry. Presented by: Dr. Hamid Ebadi

Prof. Feng Liu. Winter /10/2019

Transcription:

DEPARTMENT OF ELECTRICAL & COMPUTER ENGINEERING EEL 6562 Image Processing and Computer Vision Box Filter and Laplacian Filter Implementation Rajesh Pydipati

Introduction Image Processing is defined as the analysis, manipulation, storage, and display of graphical images from sources such as photographs, drawings, and video. Image processing spans a sequence of three steps. The input step (image capture and digitizing) converts the differences in coloring and shading in the picture into binary values that a computer can process. The processing step can include image enhancement and data compression. The output step consists of the display or printing of the processed image. Image processing is used in such applications as television and film, medicine, satellite weather mapping, machine vision, and computer based pattern recognition [1]. Problem statement: Perform low pass filtering using box filter and high pass filtering using laplacian filter on an image Approach: Box Filter: A spatial averaging filter in which all coefficients are equal is called a box filter. These types of filters are used for blurring and for noise reduction. The output of such a linear smoothing filter is simply the average of the pixels in the neighborhood of the pixel mask. The idea behind smoothing filters is straight forward. By replacing the value of every pixel in an image by the average of the gray levels in the neighborhood of the filter mask, the process results in an image with reduced sharp transitions in gray levels. Hence the most obvious application of smoothing is noise reduction. Main disadvantage with such kind of filters is that they blur edges. Laplacian filter: The laplacian is a linear operator. Since, it is a derivative operator, its use highlights gray-level discontinuities in an image and deemphasizes regions with slowly varying gray levels. This would tend to produce images that have grayish edge lines and other discontinuities, all superimposed on a dark, featureless background. Since the laplacian image contains both positive and negative values, some scaling mechanism is usually necessary for display purposes. Software Used: Visual C++ 6.0 to run the C programs. Method: For reading the Tiff image and writing the processed image to an output file, the utilities supplied on the class website (tiff_util.c, tiff_util.h) were used. For implementing the box filter in Part 1 and Laplacian mask filter in part 2, programs were written in C. 2003 Rajesh Pydipati 4 Spring 2003

Results: Part 1: Box Filter Original Image Image after masking with a Box filter Part 2: Laplacian Filter Original Image Image after masking with laplacian filter (This was scaled for display purposes) 2003 Rajesh Pydipati 5 Spring 2003

Questions Part 1: Box Filter Image after masking with laplacian filter (This was not scaled) 1) What type of filter (low pass, high pass, band pass) does this mask represent? The Box filter represents a low pass filter. It is a type of smoothing filter. The idea behind smoothing filters is straight forward. By replacing the value of every pixel in an image by the average of the gray levels in the neighborhood of the filter mask, the process results in an image with reduced sharp transitions in gray levels. 2) Explain the problem with processing the pixels at the edge of the image and give several alternate solutions. Which one did you use in your program and why? At the edges of the image, we usually have the problem that the mask area falls outside of the image and hence we need to do padding (that is adding an extra row at the top and bottom and an extra column at the left side and right side of the original). In this way we ensure that the mask always has some pixels in its area. There are several approaches that are followed in padding. The padded rows may be replicated from the edges or they may all be zeros. After the processing is done these padded rows and columns may be removed. This is one approach. Another approach is to limit the excursions of the center of the filter mask to a distance no less than (n-1)/2, if the size of the mask is n x n. But in this approach the size of the output image would be less than the input image. In my code, I implemented the zero padding technique. Thus, even though the mask center may approach the edges, filtering is done with the section of the mask that is fully contained in the image. The main advantage was that the size of the output image was the same as the input image size, since 2003 Rajesh Pydipati 6 Spring 2003

the padding was stripped off at the end. One of the drawbacks in this approach is that, as the size of the mask increases, the values of padding will have an effect near the edges. In this particular problem the size of the mask is small and also the size of the input image was small. So, I implemented this approach. However out of curiosity, the other approach (limiting the excursion of the center of the mask) was also implemented through minor variations in code and no big difference in the output was observed. Part 2: Laplacian Filter 1) What type of filter (low pass, high pass, band pass) does this mask represent? The mask given in part 2 of this problem is a type of laplacian mask. It is a type of high pass filter, since it highlights gray-level discontinuities in an image and deemphasizes regions with slowly varying gray levels. 2) How did you process the image so that none of the pixels were negative? Give several alternatives. Which one did you use in your program and why? There are several methods to deal with the problem of negative values of pixels in the laplacian filtered image. One approach is to use absolute values. This method is not usually correct, since it produces double lines of nearly equal magnitude, which can be confusing. The other method is to scale the values for display purposes. This was the method I followed in this problem. It is as follows:- i) Add 255 to every pixel and then divide by 2. This method does not guarantee that the values will cover the full range of the entire 8-bit range from 0 to 255, but all pixel values will be with in this range. The main advantage of this method is that it is simple and fast. Disadvantage is that full range of the display may not be utilized and truncation inherent in the division by 2 will generally lead to a reduction in accuracy. Due to the simplicity and inherent speed, I used this method. References: [1]. Microsoft Computer Dictionary: http://www.microsoft.com/mspress/books/5582.asp [2]. Digital Image processing by Rafael.C. Gonzalez 2003 Rajesh Pydipati 7 Spring 2003