Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Algorithms > Re: best fit li...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 7 Topic 4893 of 5064
Post > Topic >>

Re: best fit linear filter

by DharmaFog <Agile.Aspect@[EMAIL PROTECTED] > Jul 26, 2008 at 09:02 PM

On Jul 26, 12:34 am, ti_chris <tiChri...@[EMAIL PROTECTED]
> wrote:
> On Jul 24, 7:11 pm, DharmaFog <Agile.Asp...@[EMAIL PROTECTED]
> wrote:
>
>
>
> > On Jul 22, 12:18 pm, "Fredo" <fr...@[EMAIL PROTECTED]
> wrote:
>
> > > I have an image that I need to normalize the brightness on. The
image is
> > > greyscale 8-bit. I'm told I need to do a best fit linear filter. How
do I do
> > > this? Is this just a linear regression? If so, I need X&Y values and
I'm not
> > > sure what should be X vs. what should be Y. I assume one of them is
the
> > > pixel brightness. What's the other?
>
> > > Thanks
>
> > It's actually an exercise in simple ratios.
>
> > First find the maximum and minimum gray scale for the
> > image you want to normalize, i.e., the range of the existing
> > values.
>
> > Suppose you want to normalize the values to N=255.
>
> > Then
>
> >       new_value=(old_value-minimum)*N/(maximum-minimum)
>
> Although this can generate decent results, it is definitely not
> ideal.  Take the example of an image that has a concentration of
> middle-range pixels and one or two pixels at the boundaries.  In such
> a case, you would not scale the image because min = 0, max = 255,
> while in reality, you would benefit from over-saturating those couple
> pixels that are out of range.  Fredo is right.  You need to apply a
> best-fit to achieve good results here.
>
> I'm guessing you're really looking to do a linear regression.  You can
> find lots of resources if you google for that.  A simple one is
> wikipedia:
>
> http://en.wikipedia.org/wiki/Linear_regression
>
> You're effectively looking at applying least square on the difference
> between the "new value" and the "old value" given a line y = mx + b.
> Least square should minimize things decently enough that it should
> look much better than what DharmaFog is proposing.  If you want a
> quick and dirty  thing that works however, his suggestion is quite
> valid.

First, normalization implies scaling - it's doesn't imply molesting
the histogram distribution.

Second,  I really don't know what a "best fit linear filter"
is since "best" hasn't been defined.

And if was defined,  then I'd probably filter the image using
a FIR filter.

Third, in your particular case - where you evidently want
to modify the existing histogram distribution - I would
recommend trying histogram equalization

      http://en.wikipedia.org/wiki/Histogram_equalization

But beware, when you use histogram equalization (or any
other method which molests the distribution) you run the risk
of increasing the noise and decreasing the signal.
 




 7 Posts in Topic:
best fit linear filter
"Fredo" <fre  2008-07-22 14:18:51 
Re: best fit linear filter
Kaba <none@[EMAIL PROT  2008-07-23 04:20:41 
Re: best fit linear filter
DharmaFog <Agile.Aspec  2008-07-24 19:11:12 
Re: best fit linear filter
ti_chris <tiChris08@[E  2008-07-26 00:34:06 
Re: best fit linear filter
DharmaFog <Agile.Aspec  2008-07-26 21:02:37 
Re: best fit linear filter
hoffmann@[EMAIL PROTECTED  2008-07-27 10:27:28 
Re: best fit linear filter
ti_chris <tiChris08@[E  2008-07-27 16:10:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Nov 20 0:16:04 CST 2008.