Adaptive Median Filter

Slides:



Advertisements
Similar presentations
Image Processing. Overview ImagesPixel Filters Neighborhood Filters Dithering.
Advertisements

Topic 6 - Image Filtering - I DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Partitioning and Divide-and-Conquer Strategies ITCS 4/5145 Parallel Computing, UNC-Charlotte, B. Wilkinson, Jan 23, 2013.
Vector Processing. Vector Processors Combine vector operands (inputs) element by element to produce an output vector. Typical array-oriented operations.
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
1Ellen L. Walker ImageJ Java image processing tool from NIH Reads / writes a large variety of images Many image processing operations.
JET Algorithm Attila Hidvégi. Overview FIO scan in crate environment JET Algorithm –Hardware tests (on JEM 0.2) –Results and problems –Ongoing work on.
Noise Reduction from Cellular Biological Images Using Adaptive Fuzzy Filter Majbah Uddin( ) Department of Computer Science and Engineering (CSE),
MSU CSE 803 Stockman Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute.
1 Lecture 12 Neighbourhood Operations (2) TK3813 DR MASRI AYOB.
Lec 5 Feb 10 Goals: analysis of algorithms (continued) O notation summation formulas maximum subsequence sum problem (Chapter 2) three algorithms image.
MSU CSE 803 Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute some result.
Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest.
INS/GPS Integration Based Navigation using Particle Filter GPS Control System MidTerm presentation Performed by: Yuval Yosef Adi Weissman Supervised by:
Image Recognition and Processing Using Artificial Neural Network Md. Iqbal Quraishi, J Pal Choudhury and Mallika De, IEEE.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Neighborhood Operations
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Image Restoration and Reconstruction (Noise Removal)
1 Memory Management Memory Management COSC513 – Spring 2004 Student Name: Nan Qiao Student ID#: Professor: Dr. Morteza Anvari.
Digital Image Processing Image Enhancement Part IV.
Chap 3 : Binary Image Analysis. Counting Foreground Objects.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Abstract Very important field of research in image processing is the ultrasound image processing. Because of the speckels, that are caused during the.
Image Restoration Chapter 5.
Digital Image Processing Lecture 10: Image Restoration March 28, 2005 Prof. Charlene Tsai.
Digital Image Processing (Digitaalinen kuvankäsittely) Exercise 2
23 November Md. Tanvir Al Amin (Presenter) Anupam Bhattacharjee Department of Computer Science and Engineering,
Lecture 5 Mask/Filter Transformation 1.The concept of mask/filters 2.Mathematical model of filtering Correlation, convolution 3.Smoother filters 4.Filter.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Digital Image Processing Lecture 10: Image Restoration
Image Subtraction Mask mode radiography h(x,y) is the mask.
Course 2 Image Filtering. Image filtering is often required prior any other vision processes to remove image noise, overcome image corruption and change.
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
SLAAC SLD Update Steve Crago USC/ISI September 14, 1999 DARPA.
Intelligent Vision Systems ENT 496 Image Filtering and Enhancement Hema C.R. Lecture 4.
Distortion Correction ECE 6276 Project Review Team 5: Basit Memon Foti Kacani Jason Haedt Jin Joo Lee Peter Karasev.
Hierarchical Systolic Array Design for Full-Search Block Matching Motion Estimation Noam Gur Arie,August 2005.
Content Based Coding of Face Images
Miguel Tavares Coimbra
Image Subtraction Mask mode radiography h(x,y) is the mask.
Overview Part 2 – Combinational Logic Functions and functional blocks
Prototyping SoC-based Gate Drive Logic for Power Convertors by Generating code from Simulink models. Researchers Rounak Siddaiah, Graduate Student-University.
Computer Architecture Chapter (14): Processor Structure and Function
Hiba Tariq School of Engineering
An Implementation Method of the Box Filter on FPGA
Fundamentals of Spatial Filtering:
Digital Image Processing Lecture 10: Image Restoration
Energy Preserving Non-linear Filters
Cache Memory Presentation I
Image Analysis Image Restoration.
- photometric aspects of image formation gray level images
Introduction to cosynthesis Rabi Mahapatra CSCE617
Other Algorithms Follow Up
A systolic array for a 2D-FIR filter for image processing
Software and Hardware Circular Buffer Operations
A Step-By-Step Description of the System Generator Flow
Image filtering Images by Pawan Sinha.
Trying to avoid pipeline delays
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
A Step-By-Step Description of the System Generator Flow
Filtering Part 2: Image Sampling
Instruction Execution Cycle
Linear Operations Using Masks
Resampling.
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Implementation of a De-blocking Filter and Optimization in PLX
Software Development Techniques
Embedded Image Processing: Edge Detection on FPGAs
Presentation transcript:

Adaptive Median Filter By Kiran Kintali The MathWorks

Goal of This Material Implement the adaptive median filter in hardware Discuss modeling considerations when targeting for HDL (VHDL/Verilog) Learn about HDL workflow

Why Use an Adaptive Median Filter? Median filtering (and its more sophisticated version adaptive median filtering) is based on a well-known statistical operation of finding the median. It is a clever, yet simple and intuitive noise reduction method that reduces the noise by computing local statistics (distribution) of data and rejecting noise, by defining it as the outlier values in the localized distribution. (6min.) For each pixel in the image, calculate the median value in a surrounding neighborhood of the pixel. Replace the pixel with the median value. The algorithm is simple and therefore has low computational complexity. However, note that it affects all image pixels regardless of noise content, and that’s why in images or video frame with high noise content (low SNR), it blurs the image substantially. So it only performs well on low noise densities. How about adaptive median filtering? It still computes the median over the surrounding neighborhood, however, it is smart enough to check whether it is wise to replace the pixel value with the median. The adaptation part of the algorithm is a logical check; it just looks at the result of median computation, and if the median is skewed too much by noise (low SNR), it decides to define the median over a larger region to overcome the skewing of the local statistics. The algorithm continues adapting until skewing is removed. This slide shows the advantage of using an adaptive algorithm, which is more powerful and understandably more complex. References to literature are given here for your further review. Removes “salt and pepper” noise from the image The MathWorks

Median Filter For each pixel in the image, calculates the median value in a surrounding neighborhood of the pixel Replaces the pixel with the median value Affects all image pixels regardless of noise content Only performs well on low noise densities Has low computational complexity The MathWorks

Adaptive Median Filter For each pixel in the image, calculates the median value in a surrounding neighborhood of the pixel Compares the median with a threshold and decides to either replace the pixel, keep the pixel, or increase the neighborhood size and recalculate Only affects image pixels determined to have noise content Performs well for low or high noise densities Is significantly more computationally intensive The MathWorks

Adaptive Median Filter

Original Adaptive Median Filter

Issues with the Original Model The original MATLAB code is software oriented. The following constructs are unsupported for HDL code generation: Operates on the whole image Includes nested for-loops with variable bounds and breaks Combines filter algorithm and image modification code Uses double types not synthesizable in hardware Uses C math functions that cannot be mapped to hardware

Porting the Algorithm for HDL Designing the hardware architecture Serialize the image Separate the filter computation Parallelize the region computations in the algorithm Optimize the median filter algorithm for hardware

Adaptive Median Filter for Hardware (compute median pixel) Partition the image Apply new pixel or Keep the old pixel

Partitioning the Image This approach captures a column of data (9x1) of the image and feeds into the median filter. The filter buffers the column for first 9 cycles to make a 9x9 region. This is done to reduce the filter chip I/O count. 9x9 region of the image

Median Filter Algorithm in Hardware Fully parallel implementation

Filtering the Image Region Buffers input column of data (9x1) for 9 cycles to make a 9x9 region Partitions the buffer into 3x3, 5x5, 7x7, and 9x9 regions Computes [min,med,max] pixel of each of the subregions Computes output pixel using adaptive median algorithm For each region, the adaptive median filter outputs: ‘center_pixel’ (data signal) ‘pixel_valid’ (control signal) There is an initial 9-cycle delay in the center pixel computation at the begin of each scan line. Subsequent center pixels computations do not have any delay.

1D Median Filter Structure of 1D Median Filter 3x3 region min/max/median value computation for a 3x3 region requires 36 comparators (9 stages of 4 comparators each). Each computational element compares the neighboring pixels (simple Mux in hardware that rearranges input pixels). Adaptive median filter is very resource intensive.

1D Median Filter (Area Usage) 1D adaptive median filter resource usage: 3x3 region: 9 stages of 4 comparators = 36 5x5 region: 25 stages of 12 comparators = 300 7x7 region: 49 stages of 24 comparators = 1176 9x9 region: 81 stages of 40 comparators = 3240 Total number of comparators = 4752 To reduce resource usage, we adopted a less resource-intensive algorithm: the 2D median filter.

2D Median Filter Is more area friendly Apply 1D Filter on Rows then on Columns Is more area friendly Uses one 1D median filter for each row and column of a pixel region A 9x9 region would require 18 1D median filters Provides big savings in area compared with 1D (but is less accurate) Also helps to pipeline registers between row and column processing to increase frequency

Comparator Usage in 1D and 2D Filters Size 1D 2D 3x3 9*4 (36) 18 ((1*3*3)*2) 5x5 25*12 (300) 100 ((2*5*5)*2) 7x7 49*24 (1176) 294 ((3*7*7)*2) 9x9 81*40 (3240) 648 ((4*9*9)*2) Total 4752 1060 2D filter is less accurate in pixel computation. So we used this only 5x5, 7x7, and 9x9 regions, where there was big bang for buck. To reduce error rate of pixel computation for 3x3, we still used 1D median filter. This dramatically improved quality of output image because the noisy pixel being replaced was mostly found in the first 3x3 region. Final area of the algorithm is (36 + 100 + 294 + 698  1078).