Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

smoothening filter for entopy error

Status
Not open for further replies.

snake0204

Newbie level 5
Joined
Mar 31, 2008
Messages
9
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,366
smoothing filter

Hi Everyone,

I have a question regarding smoothing an arbitrary signal. The signal is a entropy error rate which indicates the amount of information contained in dark and bright pixels in an image. The EER helps to find out the illumination in the scene.

The problem is the signal is constantly varying (coz of people moving in the scene), is there any way to smooth the signal using an adaptive filter or some kind of weighted average of previous N values and reduce the amount of variation.

I attached a Matlab plot of the signal.

Thanks
Snake
 

Re: smoothing filter

You could try low pass filtering to keep only the DC component.
If you do not want to implement digital filtering an alternative could be the use of a peak detector with opportune decay constant to partially rectify the signal:see the following example

#define DECAY 0x12345 // this value define the decay time in Q1.15 format
#define BUFFSIZE 12345 // buffer size used by the processing routine

static int peakEER

// processing loop
for( i=0; i< BUFFSIZE; i++ )
{

( ... ) // EER calculation (16 bit)

if ( EER > peakEER )
peakEER = sample;
else
peakEER = (peakEER * DECAY)>>15; // shift to restore 16 bit range

( ... )

}


The key point is the DECAY value: it shall be chose to allow slow decay of the peak wrt the period of the expected lower frequency component of the signal.

The 2 methods could be also used in combination (filter and then rectify or viceversa).

Regards
Mowgli
 

Re: smoothing filter

Look at this:
https://www.dspguide.com/pdfbook.htm

... is there any way to smooth the signal using an adaptive filter or some kind of weighted average of previous N values and reduce the amount of variation.

See chapter 19 (single pole 4-stage)

There may be better filters for image processing though.
 

Re: smoothing filter

Thanks for the response!

cheers
snake
 

smoothing filter

get some info in opencore.org
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top