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

Home » Public Forums » archive » Re: blurring and deblurring for effect
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: blurring and deblurring for effect [message #42795] Wed, 23 February 2005 18:01
Rob[1] is currently offline  Rob[1]
Messages: 5
Registered: January 2005
Junior Member
Thanks Ken. That's just what I wanted.

Rob

Kenneth Bowman wrote:
> This works pretty well for me.
>
> infile = '~/Pictures/dave_index.jpg'
> READ_JPEG, infile, image
> TV, image, TRUE = 1
> cr = ''
> READ, cr, PROMPT = 'Enter <cr> to continue ...'
> image = SMOOTH(image, [1, 20, 20], /EDGE)
> TV, image, TRUE = 1
Re: blurring and deblurring for effect [message #42797 is a reply to message #42795] Wed, 23 February 2005 06:41 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1109167314.650513.117960@o13g2000cwo.googlegroups.com>,
"Rob" <robert.dimeo@nist.gov> wrote:

> David,
>
> The problem is that the smoothed image shows some strange colors.
> Since the image that I'm using is "more or less" a blue-white color
> scheme, I ditched the image colors (converted my image to gray-scale),
> loaded in color table 1, then performed the smoothing operation. This
> resulted in the look that I wanted. Unfortunately I don't know how to
> accomplish this for the general case for an image with its *own* colors
> like my PNG image.

This works pretty well for me.

infile = '~/Pictures/dave_index.jpg'
READ_JPEG, infile, image
TV, image, TRUE = 1
cr = ''
READ, cr, PROMPT = 'Enter <cr> to continue ...'
image = SMOOTH(image, [1, 20, 20], /EDGE)
TV, image, TRUE = 1

The picture is from http://www.dfanning.com/images/dave_index.jpg.

After smoothing, Dave looks much like he did at the end of the last
Expert Programmers Association meeting.

Ken Bowman
Re: blurring and deblurring for effect [message #42798 is a reply to message #42797] Wed, 23 February 2005 13:09 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1109167314.650513.117960@o13g2000cwo.googlegroups.com>,
"Rob" <robert.dimeo@nist.gov> wrote:

> David,
>
> The problem is that the smoothed image shows some strange colors.
> Since the image that I'm using is "more or less" a blue-white color
> scheme, I ditched the image colors (converted my image to gray-scale),
> loaded in color table 1, then performed the smoothing operation. This
> resulted in the look that I wanted. Unfortunately I don't know how to
> accomplish this for the general case for an image with its *own* colors
> like my PNG image.

Apologies if this shows up twice.

This seems to work pretty well for me to blur a truecolor image:

infile = '~/Pictures/dave_index.jpg'
READ_JPEG, infile, image
TV, image, TRUE = 1
cr = ''
READ, cr, PROMPT = 'Enter <cr> to continue ...'
image = SMOOTH(image, [1, 20, 20], /EDGE)
TV, image, TRUE = 1


The sample image I used is

http://www.dfanning.com/images/dave_index.jpg

After blurring David looks much like he did at the end of the last IDL
Expert Programmers Associate meeting.

Ken Bowman
Re: blurring and deblurring for effect [message #42822 is a reply to message #42797] Wed, 23 February 2005 06:01 Go to previous message
Rob Dimeo is currently offline  Rob Dimeo
Messages: 17
Registered: November 1999
Junior Member
David,

The problem is that the smoothed image shows some strange colors.
Since the image that I'm using is "more or less" a blue-white color
scheme, I ditched the image colors (converted my image to gray-scale),
loaded in color table 1, then performed the smoothing operation. This
resulted in the look that I wanted. Unfortunately I don't know how to
accomplish this for the general case for an image with its *own* colors
like my PNG image.

Of course this begs the question: How come IDL doesn't *know* what's
aesthetically pleasing to me? ;)

Rob
David Fanning wrote:
>
> Well, I thought it looked pretty good with the PNG file I
> choose, but if you want to do the MEDIAN thing, I think
> the professional image expert embeds their image in a
> larger image so that edge effects are ameliorated. Then,
> when they are finished, extracts the processed image from
> the larger image etc. (I know, but if it doesn't involve
> iTools, you and me, babe, are the only ones interested.)
>
> Cheers,
>
> David
Re: blurring and deblurring for effect [message #42823 is a reply to message #42822] Wed, 23 February 2005 04:59 Go to previous message
helaha is currently offline  helaha
Messages: 26
Registered: March 2004
Junior Member
Daer Bob,
I have written an IDL application (IQM) for interactive image
processing and the IDL's Median, Smooth and Lee Filtering is
implemented without edge effects.
More info and a tutorial of the application can be found at:
http://www.uni-graz.at/people/ahammer/IQM/index.htm
If you send me an e-mail, I can give you the download password.

Best wishes,
Helmut Ahammer

helmut.ahammer@meduni-graz.at


> Rob writes:
>
>> I have been messing around a bit with blurring an image to be used for
>> an intro for a talk. What I want to do is display a series of color
>> images over time that begin with a very blurry version first and end
>> with the sharp version. My knowledge of image processing is limited so
>> I'm hoping that you experts can help me out a bit. The original sharp
>> image is a PNG file. I use TV to display the image in a window that is
>> the same size as the image. I've tried the MEDIAN filter where the
>> width decreases with each image in the sequence but I'm not happy with
>> the band of unblurred image that extends around the perimeter of the
>> image. EDGE_TRUNCATE takes care of that in SMOOTH but the effect is
>> still not great. There seems to be a "mixing" of colors when I use
>> SMOOTH that isn't present when I use MEDIAN which is also annoying.
>> I'm looking for a very smooth and relatively seamless transition.
>>
>> If it helps the code below shows what I've been doing. Any suggestions
>> would be appreciated.
>
> Well, I thought it looked pretty good with the PNG file I
> choose, but if you want to do the MEDIAN thing, I think
> the professional image expert embeds their image in a
> larger image so that edge effects are ameliorated. Then,
> when they are finished, extracts the processed image from
> the larger image etc. (I know, but if it doesn't involve
> iTools, you and me, babe, are the only ones interested.)
>
> Cheers,
>
> David
Re: blurring and deblurring for effect [message #42840 is a reply to message #42823] Tue, 22 February 2005 14:26 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rob writes:

> I have been messing around a bit with blurring an image to be used for
> an intro for a talk. What I want to do is display a series of color
> images over time that begin with a very blurry version first and end
> with the sharp version. My knowledge of image processing is limited so
> I'm hoping that you experts can help me out a bit. The original sharp
> image is a PNG file. I use TV to display the image in a window that is
> the same size as the image. I've tried the MEDIAN filter where the
> width decreases with each image in the sequence but I'm not happy with
> the band of unblurred image that extends around the perimeter of the
> image. EDGE_TRUNCATE takes care of that in SMOOTH but the effect is
> still not great. There seems to be a "mixing" of colors when I use
> SMOOTH that isn't present when I use MEDIAN which is also annoying.
> I'm looking for a very smooth and relatively seamless transition.
>
> If it helps the code below shows what I've been doing. Any suggestions
> would be appreciated.

Well, I thought it looked pretty good with the PNG file I
choose, but if you want to do the MEDIAN thing, I think
the professional image expert embeds their image in a
larger image so that edge effects are ameliorated. Then,
when they are finished, extracts the processed image from
the larger image etc. (I know, but if it doesn't involve
iTools, you and me, babe, are the only ones interested.)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Putting bands together
Next Topic: IDL in Medical Imaging

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

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

Total time taken to generate the page: 0.00769 seconds