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

Home » Public Forums » archive » Automatic interpolation / smoothing in TV??
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
Automatic interpolation / smoothing in TV?? [message #85533] Thu, 15 August 2013 02:14 Go to next message
Jakob is currently offline  Jakob
Messages: 2
Registered: August 2013
Junior Member
Hello,

I would like to display an image with few pixels. When I use the TV command (either directly or through cgimage) I find the image is being "blurred", as if each pixel was being broken up in 8x8 cells and then values were being interpolated. For my specific purpose I want each pixel to have sharp edges.

I've searched the manuals but was not able to locate the reason for this behavior. I could plot each pixel separately using squares of appropriate size, but this seems unnecessarily clumsy?

Any hint on what I am missing would be greatly appreciated.
CJ


pro example

dens = [[7.0, 190.0, 391.0, 166.0, 6.0, 0.0],[0.0, 11.0, 63.0, 92.0, 9.0, 1.0],[0.0, 0.0, 2.0, 1.0, 0.0, 0.0]]

set_plot,'PS'
device, filename='example.ps', /color, /landscape

tv, dens, xsize=20000, ysize=10000

device, /close

end
Re: Automatic interpolation / smoothing in TV?? [message #85534 is a reply to message #85533] Thu, 15 August 2013 05:00 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jakob writes:

> I would like to display an image with few pixels. When I use the TV command (either directly or through cgimage) I find the image is being "blurred", as if each pixel was being broken up in 8x8 cells and then values were being interpolated. For my specific purpose I want each pixel to have sharp edges.
>
> I've searched the manuals but was not able to locate the reason for this behavior. I could plot each pixel separately using squares of appropriate size, but this seems unnecessarily clumsy?
>
> Any hint on what I am missing would be greatly appreciated.

My guess would be you are looking at your file using Preview on a Mac.
It always shows the wrong thing. But, everywhere else this should look
like you expect it to look. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Automatic interpolation / smoothing in TV?? [message #85536 is a reply to message #85533] Thu, 15 August 2013 06:02 Go to previous messageGo to next message
Jakob is currently offline  Jakob
Messages: 2
Registered: August 2013
Junior Member
Hi David,
thanks a lot for the answer.
Indeed, other programs show the right thing on plots generated with TV.
Meanwhile I had coded the same plot using the clumsy approach (loop over polyfill).
This does not trigger the blurring behavior in preview.
So it must have to do with the way the colored squares are described in the ps file and what preview thinks it has to do to make it "look nice".
Anyway, that solves the question.
Thanks,
CJ
Re: Automatic interpolation / smoothing in TV?? [message #85542 is a reply to message #85536] Thu, 15 August 2013 09:13 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
You can also turn off smoothing in Preview to see the "right" thing.

Preferences->PDF->Smooth text and line art.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: copying text to the system clipboard
Next Topic: How to clear a NG window without erase method?

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

Current Time: Wed Oct 08 15:11:44 PDT 2025

Total time taken to generate the page: 0.00530 seconds