IMPLEMENTATION USING THE VAN HERK/GIL-WERMAN ALGORITHM

Similar documents
GENERALIZATION: RANK ORDER FILTERS

Presented at SPIE Conf. Image Algebra and Morphological Image Processing II Conference 1568, pp , July 23-24, 1991, San Diego, CA.

7. Morphological operations on binary images

Filip Malmberg 1TD396 fall 2018 Today s lecture

][ R G [ Q] Y =[ a b c. d e f. g h I

Finger print Recognization. By M R Rahul Raj K Muralidhar A Papi Reddy

ELEC Dr Reji Mathew Electrical Engineering UNSW

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

Document Image Applications

Introduction to More Advanced Steganography. John Ortiz. Crucial Security Inc. San Antonio

Efficient 2-D Structuring Element for Noise Removal of Grayscale Images using Morphological Operations

DICOM Correction Item

Design of Parallel Algorithms. Communication Algorithms

Chapter 17. Shape-Based Operations

MATHEMATICAL MORPHOLOGY AN APPROACH TO IMAGE PROCESSING AND ANALYSIS

Textured reductions for document image analysis

MATLAB 6.5 Image Processing Toolbox Tutorial

Computer Graphics (CS/ECE 545) Lecture 7: Morphology (Part 2) & Regions in Binary Images (Part 1)

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

More image filtering , , Computational Photography Fall 2017, Lecture 4

Filtering in the spatial domain (Spatial Filtering)

An efficient algorithm for Gaussian blur using finite-state machines

Scrabble Board Automatic Detector for Third Party Applications

AN EXPANDED-HAAR WAVELET TRANSFORM AND MORPHOLOGICAL DEAL BASED APPROACH FOR VEHICLE LICENSE PLATE LOCALIZATION IN INDIAN CONDITIONS

Traffic Sign Recognition Senior Project Final Report

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

PLazeR. a planar laser rangefinder. Robert Ying (ry2242) Derek Xingzhou He (xh2187) Peiqian Li (pl2521) Minh Trang Nguyen (mnn2108)

Digital Image Processing

License Plate Localisation based on Morphological Operations

Automatic Electricity Meter Reading Based on Image Processing

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

Practical Image and Video Processing Using MATLAB

VEHICLE LICENSE PLATE DETECTION ALGORITHM BASED ON STATISTICAL CHARACTERISTICS IN HSI COLOR MODEL

Lane Detection in Automotive

1. (a) Explain the process of Image acquisition. (b) Discuss different elements used in digital image processing system. [8+8]

A Novel Multi-diagonal Matrix Filter for Binary Image Denoising

II. Basic Concepts in Display Systems

L2. Image processing in MATLAB

Unit 1.1: Information representation

Reading Barcodes from Digital Imagery

CT336/CT404 Graphics & Image Processing. Section 9. Morphological Techniques

Version 6. User Manual OBJECT

Typical Uses of Erosion

Digital images. Digital Image Processing Fundamentals. Digital images. Varieties of digital images. Dr. Edmund Lam. ELEC4245: Digital Image Processing

AN ADAPTIVE MORPHOLOGICAL FILTER FOR DEFECT DETECTION IN EDDY

APPLICATION OF COMPUTER VISION FOR DETERMINATION OF SYMMETRICAL OBJECT POSITION IN THREE DIMENSIONAL SPACE

Observer Performance of Reduced X-Ray Images on Liquid Crystal Displays

ROBOT VISION. Dr.M.Madhavi, MED, MVSREC

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

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

Gray Image Reconstruction

LOSSLESS CRYPTO-DATA HIDING IN MEDICAL IMAGES WITHOUT INCREASING THE ORIGINAL IMAGE SIZE THE METHOD

Chapter 3 Novel Digital-to-Analog Converter with Gamma Correction for On-Panel Data Driver

Automatic Morphological Segmentation and Region Growing Method of Diagnosing Medical Images

The Discrete Fourier Transform. Claudia Feregrino-Uribe, Alicia Morales-Reyes Original material: Dr. René Cumplido

A Study On Preprocessing A Mammogram Image Using Adaptive Median Filter

INDIAN VEHICLE LICENSE PLATE EXTRACTION AND SEGMENTATION

Image Processing. Adam Finkelstein Princeton University COS 426, Spring 2019

SPIHT Algorithm with Huffman Encoding for Image Compression and Quality Improvement over MIMO OFDM Channel

Digital Image Processing

Displacement Measurement of Burr Arch-Truss Under Dynamic Loading Based on Image Processing Technology

Integer Wavelet Bit-Plane Complexity Segmentation Image Steganography

Lane Detection in Automotive

CS256 Applied Theory of Computation

Implementing Morphological Operators for Edge Detection on 3D Biomedical Images

Automated Driving Car Using Image Processing

Figure Matrix - Non Verbal Reasoning questions

Images and Graphics. 4. Images and Graphics - Copyright Denis Hamelin - Ryerson University

The Eighth Annual Student Programming Contest. of the CCSC Southeastern Region. Saturday, November 3, :00 A.M. 12:00 P.M.

An Adaptive Kernel-Growing Median Filter for High Noise Images. Jacob Laurel. Birmingham, AL, USA. Birmingham, AL, USA

The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

Image Steganography using Sudoku Puzzle for Secured Data Transmission

Convolution Pyramids. Zeev Farbman, Raanan Fattal and Dani Lischinski SIGGRAPH Asia Conference (2011) Julian Steil. Prof. Dr.

IMAGE PROCESSING PROJECT REPORT NUCLEUS CLASIFICATION

Guided Image Filtering for Image Enhancement

RESEARCH PAPER FOR ARBITRARY ORIENTED TEAM TEXT DETECTION IN VIDEO IMAGES USING CONNECTED COMPONENT ANALYSIS

Image Filtering. Median Filtering

Econ 172A - Slides from Lecture 18

Digital image processing. Árpád BARSI BME Dept. Photogrammetry and Geoinformatics

Reversible Data Hiding in Encrypted Images based on MSB. Prediction and Huffman Coding

Embedded Systems CSEE W4840. Design Document. Hardware implementation of connected component labelling

Image processing for gesture recognition: from theory to practice. Michela Goffredo University Roma TRE

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

Proc. IEEE Intern. Conf. on Application Specific Array Processors, (Eds. Capello et. al.), IEEE Computer Society Press, 1995, 76-84

International Journal of Advance Engineering and Research Development

Digital Image Processing. Lecture # 3 Image Enhancement

IMAGE PROCESSING Vedat Tavşanoğlu

A SURVEY ON HAND GESTURE RECOGNITION

Inputs. Outputs. Outputs. Inputs. Outputs. Inputs

Real-Time License Plate Localisation on FPGA

Tan-Hsu Tan Dept. of Electrical Engineering National Taipei University of Technology Taipei, Taiwan (ROC)

Anna University, Chennai B.E./B.TECH DEGREE EXAMINATION, MAY/JUNE 2013 Seventh Semester

Coding and Analysis of Cracked Road Image Using Radon Transform and Turbo codes

Image Deblurring. This chapter describes how to deblur an image using the toolbox deblurring functions.

Composition in Photography

Chapter 12 Image Processing

An Implementation of LSB Steganography Using DWT Technique

On-Chip Binary Image Processing with CMOS Image Sensors

Design and Analysis of Algorithms Prof. Madhavan Mukund Chennai Mathematical Institute. Module 6 Lecture - 37 Divide and Conquer: Counting Inversions

Detection of Defects in Glass Using Edge Detection with Adaptive Histogram Equalization

Transcription:

IMPLEMENTATION USING THE VAN HERK/GIL-WERMAN ALGORITHM The van Herk/Gil-Werman (vhgw) algorithm is similar to our fast method for convolution with a flat kernel, where we first computed an accumulation matrix and then used it to quickly generate the convolution for any rectangular kernel. vhgw differs in that we compute a localized running Max (or Min) array that is specific to the size of the linear SE, and we then use the array to compute the result pixels locally (over a length equal to the SE size). The vhgw algorithm was published by van Herk in "A fast algorithm for local minimum and maximum filters on rectangular and octagonal kernels", Patt. Recog. Letters, 13, pp. 517-521, 1992 and by Gil and Werman in "Computing 2-D min, median and max filters", IEEE Trans PAMI 15(5), pp. 504-507, 1993. (There appears to be some priority dispute, so I take a neutral position and give credit to both sets of authors.) This was the first grayscale morphology algorithm to compute dilation and erosion with complexity independent of the size of the SE. It is simple and elegant, and the surprise is that it was only discovered as recently as 1992. It works for SEs composed of horizontal and/or vertical linear elements, and requires not more than 3 pixel value comparisons for each output pixel.

The algorithm has been recently refined by Gil and Kimmel, in "Efficient Dilation, Erosion, Opening and Closing Algorithms," given at ISMM (International Symposium on Mathematical Morphology) 2000, Palo Alto, CA, June 2000, and was published in Mathematical Morphology and its Applications to Image and Signal Processing, Kluwer Acad. Pub, pp. 301-310. They bring the number down below 1.5 comparisons per output pixel, at a cost of significantly increased complexity. Consequently, we'll describe and implement the original method. We describe dilation; for erosion, substitute Min for Max. In brief, the image is divided into pixel groups of length L, where L, an odd number, is the size of the SE. We describe the case for a horizontal SE with its origin at the center position (L/2). Vertical SEs are handled similarly, except the pixels are selected in vertical groups. On each raster line of length w, we compute output pixels starting at x = L/2 (to avoid boundary effects) and operate on N = (w - 2 * (L/2))/L segments of length L. N takes this particular form to avoid boundary effects on the right side as well, so that the last segment of length L is guaranteed to have the SE entirely within the image at all L points. As a result, we do not evaluate the first L/2 pixels and, in the worst case, the last 3L/2 pixels. To get reasonable results on all pixels in the image, we embed the actual image in a larger image with these augmented dimensions, where the added border pixels are appropriately initialized (to 0 for dilation and to 255 for erosion).

The algorithm proceeds for each group of L pixels in 2 steps. In the first, we form the running Max array; in the second, we evaluate the output pixel values. For each group of L pixels, we consider a window of 2L+1 pixels in the source image that extends L/2 pixels to either side. The pixel at the center of the L pixels is also at the center of this larger window. Form an array A[] of length 2L+1, consisting of backward and forward running Max pixel values, which are computed starting at the source pixel at the center of the group of L pixels. This array will coincide with the larger window of 2L+1 pixels. Now, consider the very first group in the raster. The larger window starts at the left edge (x = 0) and proceeds to x = 2L. The center value of the Max array, A[L], is given by the pixel at x = L. The value to the left of that, A[L-1], is given by the Max of the values of the pixel at x = L and the pixel at x = L-1, and so on progressively to the value at the beginning of the array, A[0], which is the Max of all pixels from x = L back to x = 0. The array values to the right of A[L] are likewise found by taking the Max of all pixels from x = L up to that point, progressing finally to the value at the end of the array, A[2L], which is the Max of all pixels from x = L to x = 2L. In all, this step requires computing 2(L-1) Max functions.

The generation of the running Max array A[] from the source image I is shown below. We display the domain over which a raster line of the image I is defined, but we do not display I[x] itself. As shown, there are N=9 pixel groups of length L for which output pixels can be computed. We magnify the first interval of length 2L+1 in I. This covers the relevant pixels in I that are used for generating the first pixel group of L output pixels in I': Once this array is formed, the values of the dilated pixels, that are written to the destination image, can easily be read off. For this first interval of length L, the L output image pixels from x = L/2 to x = 3L/2 are computed by imagining that the SE is placed on the array A with its center at one of these L locations; namely, at each pixel for which the SE fits entirely within the array A.

We start at x = L/2, where the end points of the SE are at x = 0 and x = L, and take the Max(A[0], A[L]) = A[0]. (We know here that A[0] >= A[L], by the construction of the array A.) Then at x = L/2 + 1, we take Max(A[1], A[L+1]), and so on, up to the last value at x = 3L/2, which is Max(A[L] + A[2L]) = A[2L], again by construction. In all, this step requires computing L-2 Max functions. The method for computing the destination (dilated) pixel values I'[J] from the source image I, for the first pixel group given by L/2 <= x <= 3L/2, is shown below. The computation of the output pixel at x = J is shown explicitly. The total number of comparisons per output pixel is 3-4/L, which is never greater than 3. The calculation described above is repeated at each of the N segments of length L on the raster line.

The implementation is straightforward. We set up two buffers, one to hold an entire raster line (or column, for vertical SEs) of the image, and the second to hold the running Max(Min) array of size 2L+1. The raster line buffer is used to hold the pixels in byte order. For little-endian machines, this is exactly opposite to the standard pixel order for 32-bit words, which puts the pixels in MSB-to-LSB order; i.e., 3, 2, 1, 0. The pixel order in each 32-bit word is reversed as pixels are copied to the buffer. (For big-endian machines, no pixel reshuffling is necessary.) For vertical SEs, we just take the pixels in a column in order from top to bottom. See the source code in graymorphlow.c for other details. As with binary morphology, opening and closing are defined as a sequence of erosion/dilation and v.v. These operations are idempotent, so one simple test for correctness is to open an image with a SE and then open the result. The second opening should give the same image as the original one. Our implementation permits morphological operations with SEs that are linear (horizontal or vertical) and square (implemented as a sequence of horizontal and vertical operations). The speed is independent of the size of the SE and proceeds at about 120 P3 machine cycles per output pixel, for large images. Source: http://www.leptonica.com/grayscale-morphology.html