Signal Processing and Analysis

Highlighted

Play Demo and Learn Signal Processing - Mathematical Morphological Filters

Introduction

This document includes a concept part of Mathematical Morphological Filters (MMF) and some LabVIEW codes to apply MMF.

Concept

Mathematical Morphological Filters are very popular in image processing. You could use morphological filters to detect features or remove noises. MMF could also be applied into 1D signal processing. You will find the behaviour of 1D MMF is very similar to 2D MMF.

Dilation

A dilation 1D MMF is using a structure element (SE) (similar to mask or template in image processing) to slide along the 1D signal and caculating the maximum.

Suppose we have a signal with two pulses. The pulse width is 20. If we use a SE with 10 samples of zero amplitude, the result signal will have wider pulses than the original signal. The result is something like "dilation".

dilation10.png

If we use a SE with 35 samples, the result signal will have only one much wider pulse.

dilation35.png

Erosion

Erosion is the opposite of dilation.  An erosion 1D MMF is using a structure element (SE) to slide along the 1D signal and caculating the minimum.

Take the same signal above as an example. If we use a SE with 10 samples of zero amplitude, the result signal will have narrower pulses than the original signal. The result is something like "erosion".

erosion10.png

If we use a SE with 35 samples, the result signal will have no pulse just like the SE has eaten the two pulses.

erosion35.png

Close

Like "close" in image processing, it is composed of two operations: dilation first, erosion second. This operation will retain the wider pulse just like upper envelop if we use a long SE.

Take the same signal above as an example. If we use a SE with 35 samples of zero amplitude, we will obtain the envelop which is the wider pulse:

close35.png

Open

Open is the opposite of close, It is composed of two operations: erosion first, and dilation second. This operation will retain the wider pit just like lower envelop if we use a long SE.

Take the same signal above as an example. If we use a SE with 35 samples of zero amplitude, we will obtain a zero line as the signal has no pit.open35.png

Application - Baseline Extraction

As close and open could obtain the envelop of signal, we could use a suitable combination to extract the baseline.

For example,  the input signal has 2 positive pulses and 2 negative pulses and includes a baseline. If we still use a SE with 35 samples of zero amplitude and use close operation on it, we could obtain:

bsclose.png

If we use open operation on it, we could obtain:

bsopen.png

So if we use close firstly to remove the negative pulses and use open secondly to remove the positive pulses, we will extract the baseline from the original signal.

Other application

MMF could also be applied to noise suppression if we use a suitable SE. For example, in ECG preprocessing:

ecgprep.png

LabVIEW Code

The attachment is a simple concept demo of MMF. It includes:

  1. ECG Preprocessing including removing baseline and noise suppression.
  2. A tool to play with different SE on different signals.
  3. A simple implementation of MMF using LabVIEW 8.6. You could use it in your own applications.

Message 1 of 2
(13,705 Views)
1 REPLY 1

Re: Play Demo and Learn Signal Processing - Mathematical Morphological Filters

very well document!

0 Kudos
Message 2 of 2
(961 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.