| Re: LONG AND NARROW IMAGE [message #22662] |
Tue, 28 November 2000 00:00 |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Greetings--
You may want to try PLOTIMAGE, available from my web page. You can
display a subset of an image using this technique. The trick is to
set the XRANGE and YRANGE keywords appropriately. Let's say you have
a 2000 x 200 image, and want to show the subimage from 500 to 1000.
Try this:
plotimage, img, xrange=[500,1000], ...
There are quite a few options to PLOTIMAGE that you might want to
investigate. For example:
* you can establish an alternate coordinate system with IMGXRANGE and
IMGYRANGE;
* use the RANGE keyword to scale data for the screen;
* use the /PRESERVE_ASPECT keyword to force pixels to be square, and
preserve the aspect ratio of your image.
Have fun!
Craig
PLOTIMAGE is self-contained, and can be found here, under Graphics:
http://cow.physics.wisc.edu/~craigm/idl/idl.html
"Mark Chan" <chanm@cadvision.com> writes:
> Given:
> 1 cm by 100 cm long continuous color photo (actual size). Saved in an image
> format readable by IDL (e.g. READ_JPEG or equivalent). Cannot reduce in size
> otherwise details will be lost.
>
> Want:
> Read into IDL. Display only 3 cm strip of the actual photo at any given
> time. Which portion to show depends on some other parameter output from
> another routine.
>
> Problem:
> 1) Does any one have a similar code to share? If not, any web site that I
> can get some idea on how best to do this? Any suggestion, especially on the
> logic, is greatly appreciated.
>
> 2) I got a very grainy image when the image is displayed inside IDL. The
> same image is very clear when displayed using a graphical package (e.g.
> PhotoShop or equivalent). This is the first time for me on such topic. I
> must be doing something wrong. Running IDL on WinNT4. Could it be color
> indexing problem? Or resolution problem, etc? Want to improve quality of
> image in IDL. Suggestions?
>
> Thanks in advance,
> Mark Chan
>
>
>
>
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
|
| Re: LONG AND NARROW IMAGE [message #22666 is a reply to message #22662] |
Mon, 27 November 2000 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Mark Chan (chanm@cadvision.com) writes:
> Given:
> 1 cm by 100 cm long continuous color photo (actual size). Saved in an image
> format readable by IDL (e.g. READ_JPEG or equivalent). Cannot reduce in size
> otherwise details will be lost.
Uh, what size is it? In pixels, not centimeters. Did you scan it?
What resolution did you scan it at? Is it a 24-bit image or an
8-bit image?
> Want:
> Read into IDL. Display only 3 cm strip of the actual photo at any given
> time. Which portion to show depends on some other parameter output from
> another routine.
How many pixels does your monitor support per pixel?
How many pixels is your image, etc.
> Problem:
> 1) Does any one have a similar code to share? If not, any web site that I
> can get some idea on how best to do this? Any suggestion, especially on the
> logic, is greatly appreciated.
On logic!? No, I'm not going to touch it. :-)
> 2) I got a very grainy image when the image is displayed inside IDL. The
> same image is very clear when displayed using a graphical package (e.g.
> PhotoShop or equivalent). This is the first time for me on such topic. I
> must be doing something wrong. Running IDL on WinNT4. Could it be color
> indexing problem? Or resolution problem, etc? Want to improve quality of
> image in IDL. Suggestions?
Was it a JPEG image? Did it have a color table with it?
Did you load it? When you say "grainy", do you mean the
colors didn't appear right, or that the pixels were
grainy? What IDL command did you use to display it?
Did you try to resize it?
I'm still pretty much in the dark here. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
|