Example Code

Adaptive Median Filter Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview
This VI removes ‘salt & pepper’ noise in gray scale images.

 
Description

Here in this VI, every pixel in window is verified whether it’s noisy or noise-free based on min & max gray levels in the window. Finally, noisy pixel is replaced with the median value. A simple filter was developed with 3*3 window, or better result, one can remodel the program by using 5*5, 7*7 window and so on.

It is the program for adaptive median filter whose algorithm is described in "Digital image Processing by Gonzalez" text book.


Requirements

  • LabVIEW 2012 (or compatible)
  • Vision Development Module 2012 (or compatible)


Steps to Implement or Execute Code

  1. Browse a gray image in the front panel.
  2. Run the VI to remove the ‘salt & pepper’ noise in gray scale image.

 

Additional Information or References
VI Snippet

006.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
rom391
Member
Member
on

hello, this program interest me but I have only labview 8.6. So can we save your program for labview 8.6.

Thanks

navruz_ebru
Member
Member
on

Hi, I also try to add noise and denoise but in my simulation noise and image changes constantly. Also I use your simulation I use only original image and noisy image and delete other parts, your simulation look exactly like mine