currently I am doing some first steps with GRASS to see how it all works. I've got some sample data (Landsat TM) that I would like to analyze with some of the available functions. However it seems that GRASS is not very good at displaying color images -- at least not if the histograms of the individual channels aren't properly equalized.
There is r.colors that should do the trick (I've tried grey.eq) but the results weren't too good. To my opinion the histogram is transformed to be a little like black-and-white but the dynamics aren't well. The display of d.rgb is extremely bright colored but it is difficult to see the real structure -- there are quite a few colored noise pixels that also degrade the quality.
Are there better ways to display and visually analyze satellite data? What I am especially missing is a simple linear stretch of the histogram with a 1% cutoff at each end.
Wolfgang
______________________________________________________________________________
Nachrichten, Musik und Spiele schnell und einfach per Quickstart im
WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110
I am not sure if there is an automated way to do this, perhaps a simple script
could be written with r.mapcalc. Anybody know how to do this?
The manual way to do this is to use d.histogram to obtain the values at each end
of the histogram. After that, use r.rescale to change each raster.
For example,
d.erase blue #need the color to see the curve correctly
d.histogram map=rast.b1
r.rescale input=rast output=rast.b1x from=40,140 to=0,255 #repeat this for the 3 bands, then
d.rgb red=rast.b3x green=rast.b2x blue=rast.b1x
Good luck.
-ian
Quoting Wolfgang von Hansen <wvhansen@web.de>:
Hi,
currently I am doing some first steps with GRASS to see how it all works.
I've got some sample data (Landsat TM) that I would like to analyze with some
of the available functions. However it seems that GRASS is not very good at
displaying color images -- at least not if the histograms of the individual
channels aren't properly equalized.
There is r.colors that should do the trick (I've tried grey.eq) but the
results weren't too good. To my opinion the histogram is transformed to be a
little like black-and-white but the dynamics aren't well. The display of
d.rgb is extremely bright colored but it is difficult to see the real
structure -- there are quite a few colored noise pixels that also degrade the
quality.
Are there better ways to display and visually analyze satellite data? What I
am especially missing is a simple linear stretch of the histogram with a 1%
cutoff at each end.
I am not sure if there is an automated way to do this, perhaps a
simple script could be written with r.mapcalc. Anybody know how to do
this?
The manual way to do this is to use d.histogram to obtain the values
at each end of the histogram. After that, use r.rescale to change each
raster. For example,
d.erase blue #need the color to see the curve correctly
d.histogram map=rast.b1
r.rescale input=rast output=rast.b1x from=40,140 to=0,255 #repeat this for the 3 bands, then
d.rgb red=rast.b3x green=rast.b2x blue=rast.b1x
It would probably be better to just use "r.colors ... color=rules" to
change the intensity mapping; there isn't any need to change the
actual data values.
I installed the precompiled binary for linux. I want
to intall other modules, but I can't find gmake5 nor
gmakelinks5, as the script didn't make a
/bin.i686-pc-linux-gnu directory.
Thanks,
Jaime Carrera
_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
I installed the precompiled binary for linux. I want
to intall other modules, but I can't find gmake5 nor
gmakelinks5, as the script didn't make a
/bin.i686-pc-linux-gnu directory.
If you want to compile anything which is based upon GRASS, you usually
need the source code. Code which only requires libgis and libdatetime
can be built without it, but not using gmake5.
Code which requires other libraries, e.g. the display libraries
(libraster/libdisplay/libD), the vector libraries etc can't be built
without the source code, because those libraries aren't included in
the binary distributions.
currently I am doing some first steps with GRASS to see how it all
works. I've got some sample data (Landsat TM) that I would like to
analyze with some of the available functions. However it seems that
GRASS is not very good at displaying color images -- at least not if
the histograms of the individual channels aren't properly equalized.
There is r.colors that should do the trick (I've tried grey.eq) but
the results weren't too good. To my opinion the histogram is
transformed to be a little like black-and-white but the dynamics
aren't well. The display of d.rgb is extremely bright colored but it
is difficult to see the real structure -- there are quite a few
colored noise pixels that also degrade the quality.
Are there better ways to display and visually analyze satellite data?
What I am especially missing is a simple linear stretch of the
histogram with a 1% cutoff at each end.
is it really bad data or just each channel using a different color scale?
I had the same problem when trying to visualize hyperspectral images. I created a script in R (www.r-project.org) to analyze the histogram output files and create a GRASS script automatically to correctly rescale the values for visualisation. I could then say like remove the 5% tails.
If you are interested in this script, let me know. Otherwise, I also used just a PCA transform to get a first impression of what was in the images.
Regards,
Kris
Hamish wrote:
currently I am doing some first steps with GRASS to see how it all
works. I've got some sample data (Landsat TM) that I would like to
analyze with some of the available functions. However it seems that
GRASS is not very good at displaying color images -- at least not if
the histograms of the individual channels aren't properly equalized.
There is r.colors that should do the trick (I've tried grey.eq) but
the results weren't too good. To my opinion the histogram is
transformed to be a little like black-and-white but the dynamics
aren't well. The display of d.rgb is extremely bright colored but it
is difficult to see the real structure -- there are quite a few
colored noise pixels that also degrade the quality.
Are there better ways to display and visually analyze satellite data?
What I am especially missing is a simple linear stretch of the
histogram with a 1% cutoff at each end.
is it really bad data or just each channel using a different color scale?
I have been trying to create a large scale map (18" x 24") using ps.map. I set ps.select to the large printer, but when I run ps.map and view the postscript file it only shows a quarter of the image. I convert the file using ps2pdf then view it in Acrobat Reader. Acrobat seems to be stuck on standard US Letter. However, I get the same result if I view the ps file directly in Mac's Preview.
I have been trying to create a large scale map (18" x 24") using
ps.map. I set ps.select to the large printer, but when I run ps.map
and view the postscript file it only shows a quarter of the image. I
convert the file using ps2pdf then view it in Acrobat Reader. Acrobat
seems to be stuck on standard US Letter. However, I get the same
result if I view the ps file directly in Mac's Preview.
The resulting PostScript file doesn't attempt to configure the
printer's (or viewer's) page size; it assumes that it will be set
correctly.
Nor does it write a %%BoundingBox line; it used to, but that code was
disabled because it tended to get it wrong (the bounding box only
covered the map, ignoring any title, legend etc).
You have to set the page size manually using whichever mechanism the
printer/viewer provides (printers normally have buttons for this,
GhostView/GV have a menu, ghostscript itself has the -sPAPERSIZE=
option).
> I have been trying to create a large scale map (18" x 24") using
> ps.map. I set ps.select to the large printer, but when I run ps.map
>
> and view the postscript file it only shows a quarter of the image.
> I convert the file using ps2pdf then view it in Acrobat Reader.
> Acrobat seems to be stuck on standard US Letter. However, I get the
> same result if I view the ps file directly in Mac's Preview.
The resulting PostScript file doesn't attempt to configure the
printer's (or viewer's) page size; it assumes that it will be set
correctly.
Nor does it write a %%BoundingBox line; it used to, but that code was
disabled because it tended to get it wrong (the bounding box only
covered the map, ignoring any title, legend etc).
You have to set the page size manually using whichever mechanism the
printer/viewer provides (printers normally have buttons for this,
GhostView/GV have a menu, ghostscript itself has the -sPAPERSIZE=
option).
Try running the 'ps.add.pagesize' script.
'gv' usually would show the whole page if you told it the correct size
or something bigger.
You can add the %%BoundingBox line manually at the beginning of your ps
file (thus making it Encapsulated PostScript).
%%BoundingBox: llx lly urx ury
where ll is lower-left and ur is upper-right. Units are inches*72.
Thanks to all for this. I used ps.add.pagesize to add the bounding box line. In looking at the script, I noticed that it adds 200 pixels to the x and y dimensions. Why is this?
I have since found that it is just as easy to paste
<</PageSize [1296 1728]>> setpagedevice
to the beginning of the ps file. This sets the dimensions to 18" x 24" (18*72 = 1296 and 24*72 = 1728)
Thanks again.
Brian
On Jan 14, 2004, at 6:57 PM, Hamish wrote:
I have been trying to create a large scale map (18" x 24") using
ps.map. I set ps.select to the large printer, but when I run ps.map
Try running the 'ps.add.pagesize' script.
'gv' usually would show the whole page if you told it the correct size
or something bigger.
You can add the %%BoundingBox line manually at the beginning of your ps
file (thus making it Encapsulated PostScript).
%%BoundingBox: llx lly urx ury
where ll is lower-left and ur is upper-right. Units are inches*72.
Thanks to all for this. I used ps.add.pagesize to add the bounding box
line. In looking at the script, I noticed that it adds 200 pixels to
the x and y dimensions. Why is this?
I have no idea why it was done, but it's wrong. According to the
PostScript reference manual, the requested PageSize value must match
that of a specific medium to within 5 points in order to select that
medium.