I'm having some problems using i.rgb.his/i.his.rgb to convert quickbird data from RGB to IHS and vice versa (original purpose was pan sharpening). The results look totally weird and I don't know why.
Here is a protocol along with some screenshots:
On Tue, Sep 29, 2009 at 3:26 PM, Georg Kaspar <georg@muenster.de> wrote:
Hi,
I'm having some problems using i.rgb.his/i.his.rgb to convert quickbird data
from RGB to IHS and vice versa (original purpose was pan sharpening). The
results look totally weird and I don't know why.
Here is a protocol along with some screenshots:
I also repeated the process using landsat data from the nc data set - same
problem here.
ok, I have tried that, too:
g.region rast=lsat7_2002_10
d.mon x0
d.rgb b=lsat7_2002_10 g=lsat7_2002_20 r=lsat7_2002_30
i.rgb.his b=lsat7_2002_10 g=lsat7_2002_20 r=lsat7_2002_30
h=lsat7_2002_h i=lsat7_2002_i s=lsat7_2002_s
d.his h=lsat7_2002_h i=lsat7_2002_i s=lsat7_2002_s
-> result is some grey scale image.
Perhaps that's correct?
Find attached a RGB/HIS fusion script which I wrote some years ago:
# NC data set:
i.fusion.his b=lsat7_2002_10 g=lsat7_2002_20 r=lsat7_2002_30
pan=lsat7_2002_80 prefix=fusion
g.region -p rast=fusion.red
d.mon x0
d.rgb r=fusion.red b=fusion.green g=fusion.blue
It may need some cosmetics to follow 6.4 coding standard but seems
yet to work.
...I just need the pure conversion from decimal to sexagesimal(;-)) to
convert the output of eg.:
v.to.db -p map=lines@achim option=start
, which is decimal to D:M:S in the table.
Is there something like cs2cs?
A
Markus Neteler schrieb:
On Wed, Sep 30, 2009 at 11:01 AM, achim <ak7@jupiter.uni-freiburg.de> wrote:
...by the way: is there a build in possibility to convert lat-long
degree coordinates in time coordinates? (to change this in a table)
yes, it's a false color composite. i set the colortable to grey, so the
image looks a bit dull.
I also repeated the process using landsat data from the nc data set - same
problem here.
ok, I have tried that, too:
g.region rast=lsat7_2002_10
d.mon x0
d.rgb b=lsat7_2002_10 g=lsat7_2002_20 r=lsat7_2002_30
i.rgb.his b=lsat7_2002_10 g=lsat7_2002_20 r=lsat7_2002_30
h=lsat7_2002_h i=lsat7_2002_i s=lsat7_2002_s
d.his h=lsat7_2002_h i=lsat7_2002_i s=lsat7_2002_s
-> result is some grey scale image.
Perhaps that's correct?
i converted the results back to rgb and it works. pansharpening was also
possible using channel 8.
unfortunately - it still doesn't work using quickbird data
Find attached a RGB/HIS fusion script which I wrote some years ago:
thanks for the script. unfortunately the output looks still the same
since the script makes use of the same modules. does the script work on
your installation?
Georg Kaspar wrote:
> i converted the results back to rgb and it works. pansharpening was also
possible using channel 8.
unfortunately - it still doesn't work using quickbird data
It work's, though i had to rescale all channels to 8bit using r.mapcalc. Is it possible that 16bit are not supported by i.rgb.his/i.his.rgb in general?
because I could not find something else, I write a little script to
convert lat/long decimal degrees to lat/long sexagesimal degrees
(deg:min:sec).
It works with a sqlite-database and sqlite3, t2sql.sh (to convert
text-file to a table) and awk (on all linux-systems).
Maybe someone will need this some day:
$1 table name (need a unique column "cat")
$2 column with decial-degrees
$3 column, where sexagesimal degrees will be written (can be same as $2)
$4 sqlite database-file
eg:
sh decimal_to_sexagesimal.sh table col_decimal col_sexag
/home/userneme/grass/databasefile
warning: its very modest and dont deal with execptions. (eg. overwrites
the files temp_decimal_input.txt and temp_sexagesimal_output.txt)
Achim
achim schrieb:
...I just need the pure conversion from decimal to sexagesimal(;-)) to
convert the output of eg.:
v.to.db -p map=lines@achim option=start
, which is decimal to D:M:S in the table.
Is there something like cs2cs?
A
Markus Neteler schrieb:
On Wed, Sep 30, 2009 at 11:01 AM, achim <ak7@jupiter.uni-freiburg.de> wrote:
...by the way: is there a build in possibility to convert lat-long
degree coordinates in time coordinates? (to change this in a table)
...I just need the pure conversion
from decimal to sexagesimal(;-)) to
convert the output of eg.:
v.to.db -p map=lines@achim option=start
, which is decimal to D:M:S in the table.
Is there something like cs2cs?
for the other direction there is m.proj -o (-d)
we should really add support in that to allow d:m:s input too,
Martin made some improvements in grass7, so maybe already works?
achim wrote:
> ...I just need the pure conversion
> from decimal to sexagesimal(;-)) to
> convert the output of eg.:
> v.to.db -p map=lines@achim option=start
> , which is decimal to D:M:S in the table.
ps- there was an old wish (in trac??) to have a variable set to
determine module DMS output format.
from gui/tcltk/gis.m/mapcanvas.tcl:
# FIXME: make this settable from the UI or use GRASS_DMS_FORMAT enviro var
# DMS format: 0 is ddd.dddddd, 1 is ddd:mm.mmmm', 2 is ddd:mm'ss.sss"
Georg Kaspar wrote:
> i converted the results back to rgb and it works. pansharpening was also
> possible using channel 8.
> unfortunately - it still doesn't work using quickbird data
It work's, though i had to rescale all channels to 8bit using r.mapcalc.
Is it possible that 16bit are not supported by i.rgb.his/i.his.rgb in
general?
AFAICT, i.rgb.his requires that the data is 0-255.