comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Gaussian Enhancement on Image Histogram
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Gaussian Enhancement on Image Histogram [message #45563] Wed, 21 September 2005 07:35
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
raval.chintan@gmail.com wrote:
> David,
>
> Thank you for reply, Here the problem is with Gaussint function , the
> eqation that is given in the documentation that says that this Gaussian
> function is calculated for the Mean = 0 and Sandard Deviation = 1 (
> Because the Variance = 1 ), now i want to plot the curve for different
> standard deviation. How is it possible? ( if you check with envi
> ,Gaussian enhancement, Interactive Streching , It will allow you to
> change the Standard deviation , in option menu , and according to that
> the curve will change,.)

For a gaussian curve with mean value of m and a standard deviation of
s, the integral from 0 to x is s*GAUSSINT((x-m)/s).
Re: Gaussian Enhancement on Image Histogram [message #45568 is a reply to message #45563] Wed, 21 September 2005 04:04 Go to previous message
raval.chintan is currently offline  raval.chintan
Messages: 54
Registered: May 2005
Member
David Fanning wrote:
> Chintan Raval writes:
>
>> Thank you for your suggestion. One can definitely use FCN but in order
>> to obtain a monotonically increasing FCN I need to
>> 1) Map the Histogram for 0- 255 levels to 3 sigma of Gaussian PDF
>> 2) Obtain the cumulative histogram for this mapping (This will yield
>> monotonically increasing function)
>>
>> If you refer IDL documentation the GaussInt function computes the PDF
>> for mean value of 0 and variance of 1(i.e standard deviation of 1). My
>> problem is to compute the Gaussian PDF with 3 sigma (standard
>> deviation) for a given value of x with mean at 127.
>>
>> I would appriciate if you can point out how I can achieve this. It
>> would be nice if you can provide some example code.
>
> Oh, dear. I was hoping *you* were going to supply the example code. :-(
>
> I'd go over to Craig's site and poke around for Gauss1. That
> will allow you to build the Gaussian you are looking for.

Thank You David, I have find it on Craig's Web site , Now it is working
fine.


>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/


Regards
Chintan
Re: Gaussian Enhancement on Image Histogram [message #45571 is a reply to message #45568] Tue, 20 September 2005 22:58 Go to previous message
raval.chintan is currently offline  raval.chintan
Messages: 54
Registered: May 2005
Member
David,

Thank you for reply, Here the problem is with Gaussint function , the
eqation that is given in the documentation that says that this Gaussian
function is calculated for the Mean = 0 and Sandard Deviation = 1 (
Because the Variance = 1 ), now i want to plot the curve for different
standard deviation. How is it possible? ( if you check with envi
,Gaussian enhancement, Interactive Streching , It will allow you to
change the Standard deviation , in option menu , and according to that
the curve will change,.)

Chintan
Re: Gaussian Enhancement on Image Histogram [message #45577 is a reply to message #45571] Tue, 20 September 2005 10:10 Go to previous message
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
How about this:

x = findgen(256) / 255 - 0.5
x = 6*x

fcn = gaussint(x)
Re: Gaussian Enhancement on Image Histogram [message #45581 is a reply to message #45577] Tue, 20 September 2005 09:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Chintan Raval writes:

> Thank you for your suggestion. One can definitely use FCN but in order
> to obtain a monotonically increasing FCN I need to
> 1) Map the Histogram for 0- 255 levels to 3 sigma of Gaussian PDF
> 2) Obtain the cumulative histogram for this mapping (This will yield
> monotonically increasing function)
>
> If you refer IDL documentation the GaussInt function computes the PDF
> for mean value of 0 and variance of 1(i.e standard deviation of 1). My
> problem is to compute the Gaussian PDF with 3 sigma (standard
> deviation) for a given value of x with mean at 127.
>
> I would appriciate if you can point out how I can achieve this. It
> would be nice if you can provide some example code.

Oh, dear. I was hoping *you* were going to supply the example code. :-(

I'd go over to Craig's site and poke around for Gauss1. That
will allow you to build the Gaussian you are looking for.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Gaussian Enhancement on Image Histogram [message #45582 is a reply to message #45581] Tue, 20 September 2005 09:30 Go to previous message
raval.chintan is currently offline  raval.chintan
Messages: 54
Registered: May 2005
Member
Hi David,

Thank you for your suggestion. One can definitely use FCN but in order
to obtain a monotonically increasing FCN I need to
1) Map the Histogram for 0- 255 levels to 3 sigma of Gaussian PDF
2) Obtain the cumulative histogram for this mapping (This will yield
monotonically increasing function)

If you refer IDL documentation the GaussInt function computes the PDF
for mean value of 0 and variance of 1(i.e standard deviation of 1). My
problem is to compute the Gaussian PDF with 3 sigma (standard
deviation) for a given value of x with mean at 127.

I would appriciate if you can point out how I can achieve this. It
would be nice if you can provide some example code.

J.D I thought this would interest you? looking forward for your
comments on this

Chintan Raval
Re: Gaussian Enhancement on Image Histogram [message #45584 is a reply to message #45582] Tue, 20 September 2005 08:50 Go to previous message
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
Can't you use the HIST_EQUAL function? The FCN keyword appears to
allow a user-defined distribution function.
Re: Gaussian Enhancement on Image Histogram [message #45588 is a reply to message #45584] Tue, 20 September 2005 07:30 Go to previous message
raval.chintan is currently offline  raval.chintan
Messages: 54
Registered: May 2005
Member
Hi,

I got the answer on google, but for this i have to implement Gaussian
Normal Distribution function in one dimension IDL..
The eqation is given in the following web site,

http://mathworld.wolfram.com/GaussianFunction.html
Now if you change the range of the Standard Deviation from the text box
the Graph is being changed according to the eqation. Is there any
direct function call in IDL for this eqation or i have to implement it
?

Again Thanks in Advance.

Chintan Raval
Re: Gaussian Enhancement on Image Histogram [message #45595 is a reply to message #45588] Mon, 19 September 2005 23:27 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
raval.chintan@gmail.com writes:

> Thanks for replying. I am writing my code which is independent of
> ENVI, means i do not want to call the envi routines. I have some
> thoughts for doint this thing in IDL but some how i am not able to find
> the exact path for doing this. In this i have to make my look up table
> according to the Gaussian Probability Distribution Function (PDF) after
> applying the Gaussian enhancement on histogram or (Cumulative
> Histogram). Here When ever i am applying the Enhancement i also have to
> give maximum and minimum limit of intensity from the histogram.
>
> I do not know if this is the correct way to do or not?

I don't know the correct way either, but I would guess this
is similar to the Histogram Matching algorithm I detail in
this article:

http://www.dfanning.com/ip_tips/histomatch.html

At least it is a place to start.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Gaussian Enhancement on Image Histogram [message #45596 is a reply to message #45595] Mon, 19 September 2005 23:14 Go to previous message
raval.chintan is currently offline  raval.chintan
Messages: 54
Registered: May 2005
Member
Hi Jeff,

Thanks for replying. I am writing my code which is independent of
ENVI, means i do not want to call the envi routines. I have some
thoughts for doint this thing in IDL but some how i am not able to find
the exact path for doing this. In this i have to make my look up table
according to the Gaussian Probability Distribution Function (PDF) after
applying the Gaussian enhancement on histogram or (Cumulative
Histogram). Here When ever i am applying the Enhancement i also have to
give maximum and minimum limit of intensity from the histogram.

I do not know if this is the correct way to do or not?

Chintan Raval
Re: Gaussian Enhancement on Image Histogram [message #45619 is a reply to message #45596] Mon, 19 September 2005 12:22 Go to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
Why not use the ENVI routine that does this? You can call STRETCH_DOIT
and set METHOD=3.

Jeff
Re: Gaussian Enhancement on Image Histogram [message #45620 is a reply to message #45619] Mon, 19 September 2005 11:01 Go to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
Why not just use the ENVI routine that does this? You want to use
STRETCH_DOIT and set METHOD=3.

Jeff



raval.chintan@gmail.com wrote:
> Hi,
>
> I want to apply Gaussian Enhancement (not filter) on image histogram
> in IDL , as envi does. but i do not know the exact method. Can any body
> help me in that?
>
> Thanks in Advance.
>
> Chintan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL and me!
Next Topic: Re: IDL and me!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:39:43 PDT 2025

Total time taken to generate the page: 0.00694 seconds