×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

MEDIAN FILTER,FOR BASIC
3

MEDIAN FILTER,FOR BASIC

MEDIAN FILTER,FOR BASIC

(OP)
HELLO: WELL I HAVE SPENT MOST OF THE DAY READING ONLINE ARTICLES ABOUT CODING FOR A MEDIAN FILTER. EVEN TRIED AN EXAMPLE,STILL OVER MY HEAD...I HAVE A 22 BIT ADC FOR A CO2 SENSOR,OUTPUT IS IN P.P.M., SO AT 5% GAS OR (50,000 PPM IS WHAT I WILL DISPLAY),THE READING IS A LITTLE JUMPY. LIKE 50,130, 50,090, 50,000, 50,065...SO FORTH. I HAVE READ THAT A MEDIAN FILTER IS A GREAT WAY TO RID THE NOISE FROM THE DATA. ANYWAY I CAN USE SOME EXPERTISE EVEN A CODE EXAMPLE IN BASIC...EVEN A GOOD BOOK OR WEBSITE TO STUDY WITH EXAMPLES. ANY HELP UNDERSTANDING HOW TO CODE THIS WILL BE VERY APPRECIATED....THANK YOU.P.S. SEE THE LINK ATTACHED.

RE: MEDIAN FILTER,FOR BASIC

If a display is jumpy, just average the last 'X' values. After 10 reads, average the 10 readings and display that. When a new reading comes in, throw the oldest away and calculate a new average.

Dan - Owner
http://www.Hi-TecDesigns.com

RE: MEDIAN FILTER,FOR BASIC

(OP)
THANKS FOR THE REPLY: I DID TRY THE AVERAGING TECHNIQUE,IT HELPS A LOT. THERE IS STILL THAT ANOMALOUS READING THAT POPS US DUE TO THE FACT I AVERAGE IN THE NOISE WITH THE ACTUAL DATA....FROM WHAT I READ ABOUT THE MEDIAN TYPE FILTER IT IS LESS LIKELY TO HAVE ANY OF THE NOISE IN THE FINAL AFTER THE MATH..IF YOU OR ANY ONE KNOWS OF A CODE EXAMPLE (IN BASIC) FOR A MEDIAN TYPE FILTER THAT WOULD BE HELPFUL..I SENT THE LINK FOR EMESYSTEMS.COM..(I GUESS I NEED MORE HELP THEN THAT???)..

RE: MEDIAN FILTER,FOR BASIC

Please refrain from using all caps; I don't get why no one has mentioned this to you before now.

Median filters work best with salt&pepper noise; for the example you gave, it will not make much of a difference. Nonetheless, there are examples on the Mathworks site for Matlab:

Or: http://www.sourcecodeonline.com/list?q=median_filt...

TTFN
FAQ731-376: Eng-Tips.com Forum Policies

Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers

RE: MEDIAN FILTER,FOR BASIC

(OP)
thanks for the reply: what is the matter with the caps????..anyway thanks for the link,actually i need code example in basic programing language for a running average routine...thank you all for any info..

RE: MEDIAN FILTER,FOR BASIC

All caps are inherently more difficult to read, since 99.99% of all text is in Sentence case or Title Case. Because most people are not used to reading all caps, they require more work to recognize and process the words. Moreover, in some circles, all caps is considered to be equivalent to shouting by an obnoxious person.

All text-based procedural languages are fairly similar in structure; multiplications are multiplications, arrays are usually fairly recognizable.

TTFN
FAQ731-376: Eng-Tips.com Forum Policies

Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers

RE: MEDIAN FILTER,FOR BASIC

MacGyverS2000 gave you the algorithm in meta-code already.
Read his message again.

Mike Halloran
Pembroke Pines, FL, USA

RE: MEDIAN FILTER,FOR BASIC

(OP)
OK THANKS FOR ALL THE INPUT....I REALLY DO APPRECIATE IT...I WAS ASKING FOR A CODE EXAMPLE...I FINALLY FIGURED IT OUT ON MY OWN,THANKS AGAIN...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources