| View previous topic :: View next topic |
| Author |
Message |
Fredo Guest
|
Posted: Wed Jul 23, 2008 6:36 pm Post subject: best fit linear filter |
|
|
I have an image that I>m told I need to do a best fit linear filter on, but
I>m not exactly sure what that means and searches on it keep leading me to
linear regression, which I don>t think is what I want, but maybe it is.
Can someone give me some help here? If it>s a linear regression and the
pixel brightness (they>re 8-bit greyscale) is X, what is Y?
Thanks. |
|
| |
|
Back to top |
aruzinsky Guest
|
Posted: Wed Jul 23, 2008 6:36 pm Post subject: Re: best fit linear filter |
|
|
On Jul 23, 7:36 am, "Fredo" <fr...@hotmail.com> wrote:
[quote]I have an image that I>m told I need to do a best fit linear filter on, but
I>m not exactly sure what that means and searches on it keep leading me to
linear regression, which I don>t think is what I want, but maybe it is.
Can someone give me some help here? If it>s a linear regression and the
pixel brightness (they>re 8-bit greyscale) is X, what is Y?
Thanks.
[/quote]
Too vague. On a 1 to 10 scale, with 10 the most vague, your question
is a 9.5.
What are you trying to do with the filter? Am I supposed to assume
that the person who told you that isn>t an idiot? |
|
| |
|
Back to top |
Guest
|
Posted: Wed Jul 23, 2008 6:36 pm Post subject: Re: best fit linear filter |
|
|
Fredo schrieb:
[quote]I have an image that I>m told I need to do a best fit linear filter on, but
I>m not exactly sure what that means and searches on it keep leading me to
linear regression, which I don>t think is what I want, but maybe it is.
Can someone give me some help here? If it>s a linear regression and the
pixel brightness (they>re 8-bit greyscale) is X, what is Y?
Thanks.
[/quote]
Coming from
comp.graphics.algorithms
it seems you forgot to copy this phrase:
'I have an image that I need to normalize the brightness on.'
I don>t know any algorithm for brightness normalization, but it
is possible to achieve a reasonable brightness automatically.
My suggestion: try something like Photoshop>s Auto Contrast.
The darkest pixels (excluding the darkest 0.5 %) are mapped to 0.
The brightest pixels (excluding the brightest 0.5%) are mapped to
255.
For a passport photo we can assume that the background is light
(as far as I know), and that it consumes a more or less fixed
percentage
of the area. Then we can use the mean gray value of the image as a
reference for normalization, for instance:
1. the head plus background: Gray=183, L*=74 (of 100)
2. the head without background: Gray=138, L*=57
The Lab lightness L* for the the head alone is expected near to 50.
If the value should differ considerably, then we can apply either a
power function y=round(255*(x/255)^a) with a>1 for brighter and a<1
for darker, or a quadratic polynomial with banana-like shape.
The exponent (a) or the polynomial coefficients can be calculated,
if required.
It would be very helpful to test strategies by Photoshop (as I did).
Mean values are found by 'Histogram'. Background can be excluded
by a coarse selection.
Hope this helps a little.
Best regards --Gernot Hoffmann |
|
| |
|
Back to top |
Fredo Guest
|
Posted: Wed Jul 23, 2008 8:53 pm Post subject: Re: best fit linear filter |
|
|
This is based on a text file that I came across in a demo app that I
downloaded somewhere and can>t seem to find anymore in the context of
normalizing the brightness of the image. Sorry, I probably could have thrown
that in, but not knowing what a "best fit linear filter" is, and the fact
that there>s no further explanation in the text file, I>m not really sure
what information is needed to answer my question.
The images are supposed to go into a neural net which does face recognition
with the images.
And on a scale of 1 to 10 with 10 being the most dickish reply, yours rates
about an 8.
The text says that the image needs to be scaled down to 64x64, tha the image
"aruzinsky" <aruzinsky@general-cathexis.com> wrote in message
news:86fabae4-cedd-400d-95f3-8deccfae6c59@c58g2000hsc.googlegroups.com...
On Jul 23, 7:36 am, "Fredo" <fr...@hotmail.com> wrote:
[quote]I have an image that I>m told I need to do a best fit linear filter on,
but
I>m not exactly sure what that means and searches on it keep leading me to
linear regression, which I don>t think is what I want, but maybe it is.
Can someone give me some help here? If it>s a linear regression and the
pixel brightness (they>re 8-bit greyscale) is X, what is Y?
Thanks.
[/quote]
Too vague. On a 1 to 10 scale, with 10 the most vague, your question
is a 9.5.
What are you trying to do with the filter? Am I supposed to assume
that the person who told you that isn>t an idiot? |
|
| |
|
Back to top |
Science.Medical.Imaging L Guest
|
Posted: Thu Jul 24, 2008 1:04 am Post subject: Re: best fit linear filter |
|
|
On Jul 23, 8:18 am, aruzinsky <aruzin...@general-cathexis.com> wrote:
[quote]On Jul 23, 7:36 am, "Fredo" <fr...@hotmail.com> wrote:
I have an image that I>m told I need to do a best fit linear filter on, but
I>m not exactly sure what that means and searches on it keep leading me to
linear regression, which I don>t think is what I want, but maybe it is.
Can someone give me some help here? If it>s a linear regression and the
pixel brightness (they>re 8-bit greyscale) is X, what is Y?
Thanks.
Too vague. On a 1 to 10 scale, with 10 the most vague, your question
is a 9.5.
What are you trying to do with the filter? Am I supposed to assume
that the person who told you that isn>t an idiot?
[/quote]
Aruzinsky,
Please watch what you write. You are not Prof. Einstein here to boast
around with strong words. Stick to what the original poster asked
without putting any offensive words. If I could, I would recommend you
be banned from public forums. |
|
| |
|
Back to top |
Science.Medical.Imaging L Guest
|
Posted: Thu Jul 24, 2008 1:07 am Post subject: Re: best fit linear filter |
|
|
On Jul 23, 8:18 am, aruzinsky <aruzin...@general-cathexis.com> wrote:
[quote]On Jul 23, 7:36 am, "Fredo" <fr...@hotmail.com> wrote:
I have an image that I>m told I need to do a best fit linear filter on, but
I>m not exactly sure what that means and searches on it keep leading me to
linear regression, which I don>t think is what I want, but maybe it is.
Can someone give me some help here? If it>s a linear regression and the
pixel brightness (they>re 8-bit greyscale) is X, what is Y?
Thanks.
Too vague. On a 1 to 10 scale, with 10 the most vague, your question
is a 9.5.
What are you trying to do with the filter? Am I supposed to assume
that the person who told you that isn>t an idiot?
[/quote]
Aruzinsky,
You need to watch what you write. This is not a place to abuse words. |
|
| |
|
Back to top |
J Guest
|
Posted: Thu Jul 24, 2008 8:35 am Post subject: Re: best fit linear filter |
|
|
On Jul 23, 2:36 pm, "Fredo" <fr...@hotmail.com> wrote:
[quote]I have an image that I>m told I need to do a best fit linear filter on, but
I>m not exactly sure what that means and searches on it keep leading me to
linear regression, which I don>t think is what I want, but maybe it is.
Can someone give me some help here? If it>s a linear regression and the
pixel brightness (they>re 8-bit greyscale) is X, what is Y?
Thanks.
[/quote]
The goal is probably to remove the global (lowest frequency) lighting
effects from your face data set. I would think that any sort of
recursive ultra low pass filter is the ideal tool for the job for
quickly estimating the global lighting. It is possible to write a
recursive IIR filter that produces the linear least squares fit to
data (used in target tracking, parameter estimation), which may be
what you have been recommended. I would have thought any low-pass
IIR filter would do the job. If you run one of these filters on an
image (possibly from left-right then back again, plus top-bottom and
back again), then you get a very low-pass image which can be
subtracted from the original. This enhances the features which are
relevant for face recognition, and partially removes the global
lighting features which are irrelevant.
Regards
Jason
Vision Experts Ltd |
|
| |
|
Back to top |
aruzinsky Guest
|
Posted: Thu Jul 24, 2008 2:44 pm Post subject: Re: best fit linear filter |
|
|
On Jul 23, 7:07 pm, "Science.Medical.Imaging List"
<pixel.to.l...@gmail.com> wrote:
[quote]On Jul 23, 8:18 am, aruzinsky <aruzin...@general-cathexis.com> wrote:
On Jul 23, 7:36 am, "Fredo" <fr...@hotmail.com> wrote:
I have an image that I>m told I need to do a best fit linear filter on, but
I>m not exactly sure what that means and searches on it keep leading me to
linear regression, which I don>t think is what I want, but maybe it is.
Can someone give me some help here? If it>s a linear regression and the
pixel brightness (they>re 8-bit greyscale) is X, what is Y?
Thanks.
Too vague. On a 1 to 10 scale, with 10 the most vague, your question
is a 9.5.
What are you trying to do with the filter? Am I supposed to assume
that the person who told you that isn>t an idiot?
Aruzinsky,
You need to watch what you write. This is not a place to abuse words.- Hide quoted text -
- Show quoted text -
[/quote]
What abuse? My only obligation is to tell the truth. |
|
| |
|
Back to top |
Fredo Guest
|
Posted: Thu Jul 24, 2008 8:27 pm Post subject: Re: best fit linear filter |
|
|
Jason, thanks. That makes a great deal of sense.
"J" <jason@visionexperts.co.uk> wrote in message
news:42978c44-01c5-45e9-b7ba-c2ffaef4309f@c65g2000hsa.googlegroups.com...
[quote]On Jul 23, 2:36 pm, "Fredo" <fr...@hotmail.com> wrote:
I have an image that I>m told I need to do a best fit linear filter on,
but
I>m not exactly sure what that means and searches on it keep leading me
to
linear regression, which I don>t think is what I want, but maybe it is.
Can someone give me some help here? If it>s a linear regression and the
pixel brightness (they>re 8-bit greyscale) is X, what is Y?
Thanks.
The goal is probably to remove the global (lowest frequency) lighting
effects from your face data set. I would think that any sort of
recursive ultra low pass filter is the ideal tool for the job for
quickly estimating the global lighting. It is possible to write a
recursive IIR filter that produces the linear least squares fit to
data (used in target tracking, parameter estimation), which may be
what you have been recommended. I would have thought any low-pass
IIR filter would do the job. If you run one of these filters on an
image (possibly from left-right then back again, plus top-bottom and
back again), then you get a very low-pass image which can be
subtracted from the original. This enhances the features which are
relevant for face recognition, and partially removes the global
lighting features which are irrelevant.
Regards
Jason
Vision Experts Ltd[/quote] |
|
| |
|
Back to top |
|